← Home ← Back to /g/

Thread 106375242

186 posts 86 images /g/
Anonymous No.106375242 >>106375263 >>106375445 >>106380632 >>106392490 >>106396137 >>106396734 >>106398990 >>106402590 >>106403679 >>106405612 >>106409178
/dpt/ - Daily Programming Thread
What are you working on, /g/?

Previous thread: >>106339960
Anonymous No.106375263
>>106375242 (OP)
I ain't working on shit.
Anonymous No.106375445 >>106375493 >>106377799 >>106380205 >>106380632 >>106387607
>>106375242 (OP)
Is this UI usable? Is it good being simple or does it need improvements?
Also
>XAML UI is a pain in the ass and makes me want to kms
Anonymous No.106375493 >>106384787
>>106375445
You should make the left and right messages have different colors. And the colors should be way less saturated.
Anonymous No.106377799 >>106384787
>>106375445
lol please don't tell me you're using xamarin/maui
Anonymous No.106378270
I can't find anything to commit to. I just flip flop endlessly between the same few languages and project ideas, never getting far enough to build any real expertise.
Anonymous No.106378826 >>106378860 >>106378881 >>106378924 >>106379317
ACK
Anonymous No.106378860
>>106378826
Rust was always a schizophrenic attempt at fixing the modern software problems, it's like
>people have food poisoning
>therefore we must provide all the food in a safe manner
>people start having more food poisoning
Anonymous No.106378881
>>106378826
THIS IS FOR MY SAFETY
traily !!zLGKB/yRaFq No.106378924
>>106378826
Anonymous No.106379317
>>106378826
Source? I'd like to see the analysis about package contents not matching the git repositories. That seems like a misunderstanding of some kind.
Anonymous No.106379326 >>106379453 >>106380731 >>106390769 >>106393715
Post books to avoid
Anonymous No.106379453
>>106379326
Anonymous No.106380127 >>106380192
Has anyone done nand to tetris before? How was it?
Anonymous No.106380192 >>106380588 >>106380769
>>106380127
I'll report back in 6 weeks bros
Anonymous No.106380205 >>106384787
>>106375445
>Is this UI usable?
I don't know what the page furthest to the right is showing, but the rest is usable
Some things to consider:
- You don't need to show the sender on each message in private DMs
- Add some shadow and slight gradient color or weaker/more transparent color for the message cards
- standardize the margins of card content (date info-to-bottom distance should be same as user name-to-top distance)
- the rounded corners don't feel smooth, so figure out why.
- don't use a play button to signify sending
- support custom backgrounds and message bubble shape and color
- use/design a chat bubble component, which has a tail signifying the sender instead of a plain box
- sender/receiver colors should be different. ideally, the sender (me) should be pronounced and other messages should offer plain colors with better readability.
Anonymous No.106380529 >>106380577 >>106380584 >>106380755 >>106380986 >>106385075
>>106378085
>>106378085
brumpo
Anonymous No.106380577 >>106385075
>>106380529
Possibly Nim.
Anonymous No.106380584 >>106385075
>>106380529
This thread might fall off the catalog due to no maids.
Anonymous No.106380588
>>106380192
I feel like I'm in good hands
Anonymous No.106380632 >>106384787
>>106375242 (OP)
trying to fix UDIMM/RDIMM memory training for fam15h in coreboot, because some retard fucked it up to the point where coreboot completely dropped the KCMA-D8 board
>>106375445
remove rounded corners, add colours
Anonymous No.106380701 >>106398169
bgfx, sokol, wgpu_native, or SDL3 GPU?
Anonymous No.106380731 >>106380769
>>106379326
Anonymous No.106380755 >>106382784
>>106380529
>inane question #723423542
Anonymous No.106380769 >>106380900 >>106381104
>>106380192
This is an extremely fun class.

>>106380731
Green dragon is possibly the best compiler book ever written and Aho and Ullman are amazing writers who onky get better when paired up.
Anonymous No.106380900 >>106381181 >>106381181 >>106381196
>>106380769
>Green dragon is possibly the best compiler book ever written and Aho and Ullman are amazing writers who onky get better when paired up.
I think the frustration comes from the expectation of meaty compiler backend topics, only to find chapter after chapter of already solved frontend problems. No in-depth optimization techniques. Not targeting a popular backend. No core info for those wanting to make their own backends.
>https://www.youtube.com/playlist?list=PLRAdsfhKI4OWNOSfS7EUu5GRAVmze1t2y
This guys builds a VM lang using a modern langauge plus a neat library to emit intermediate representation which is a nice practical experience.
Anonymous No.106380986
>>106380529
Small working memory and untyped languages do not mix.
Anonymous No.106381104 >>106381181 >>106381196
>>106380769
>Green dragon is possibly the best compiler book ever written and Aho and Ullman are amazing writers who onky get better when paired up.
Everything about the frontend (parsing and semantic checking) is deprecated as fuck, the middle end barely talks about SSA, the sections about the code generations are extremely too short and don't talk about modern algorithms for them.
Anonymous No.106381181 >>106383405
>>106380900
>>106381104
It is an intro level book. It isn't the last or only compiler book you read. It is the first one you read. The really good content comes in the form of very thoroughly explaining the math. It is one of the few compiler books where you can basically start from nothing with and come out the other side with enough of an understanding to build a simple compiler and/or study the topic further. The books by Niklaus Wirth and Ralph Griswold are similar in quality, though Griswold is a little less beginner friendly.

>>106380900
Thank you for the videos. I will check these out.
Anonymous No.106381196 >>106382034 >>106383405
>>106380900
>>106381104
What's a good alternative? I've got dragon book but ran into these issues.
Anonymous No.106382034
>>106381196
I assume you've got the theory/definitions part. Now understand this: All roads lead to LLVM.
Or.. take a look at the native zig backend. You can also use established langs to make a VM, which is easy with readily available mature and simple projects, especially stack machine.
Anonymous No.106382784
>>106380755
there are no inane questions, only inane answers
Anonymous No.106383187 >>106385137
Fixed the horribly glitching out wall. Still some other graphical issues but at least it's a lot less horrible to look at now.
Anonymous No.106383405
>>106381196
>What's a good alternative?
There isn't a single alternative, a language is really something very customized (or else what's the point of it) so no one book will cover everything you need. You should just try to find what you need wherever you can find it.
That's is true in particular for the front end. For a simple front end you only ever need a handful for parsing, type checking, basic code generation (three address code or bytecode), the rest is normal programming logic. It's for things like more complex type checking/type inference that you'll need some ressources. For metaprogramming, forget it, you certainly won't find anything interesting in any existing book, you need to think for yourself here. If you decide you want hugienic macros though, look it up.

For the optimization, it all starts with the IR, so "SSA-based Compiler Design" is a must. For the classic optimzations themselves, I've heard the book by Muchnick is good but there are others. For more specific optimizations it depends what you want to do.
For the code generation there are many factors so it depends what do you want to generate and how optimal it should be. There are a lot of different algorithms for intruction selection, register allocation, instruction scheduling. "Recently" and at least for the first 2, algorithms have been developped to work directly on the SSA, so even the backend/code generation has a fuzzy frontier with the middle end/optimization phase.

>>106381181
>It is an intro level book. It isn't the last or only compiler book you read. It is the first one you read.
No it's a massive waste of time and it's harmful in almost every way. Especially for the front end.
Anonymous No.106384712
https://ideone.com/a42kXa
: s, ( au-) dup c, here swap dup allot move ;
: s+ ( a-a) count + ;

\ verses: tag c, beast s, aside s, len c,
: v: ( u-) here >r c, parse-name s, 10 parse s, here r> - c, ;
: v+ ( a-a) 1+ s+ s+ 1+ ;
: v- ( a-a) 1- dup c@ - ;
: tag ( au-af) over c@ = ;

Create fly
1 v: fly I don't know why she swallowed a fly, perhaps she'll die.
1 v: spider It wiggled and jiggled and tickled inside her.
0 v: bird How absurd, to swallow a bird.
0 v: cat Imagine that! She swallowed a cat!
0 v: dog What a hog to swallow a dog.
0 v: goat She just opened her throat and swallowed that goat.
0 v: cow I don't know how she swallowed that cow.
2 v: horse.. She's dead, of course.

: twaolwsa ( -) ." There was an old lady who swallowed a " ;
: sst ( -) ." She swallowed the " ;
: tct ( -) ." to catch the " ;
: dot ( -) '.' emit ;
: beast ( a-a) dup 1+ count type ;
: aside ( a-a) cr dup 1+ s+ count type ;
: ?aside ( a-a) 1 tag if aside then ;
: reason- ( a-a) cr sst beast tct v- beast dot ?aside ;
: reasons ( a-a) dup begin reason- dup fly = until drop ;
: lyric ( a-a) cr cr twaolwsa beast dot aside ;
: verses ( a-a) begin lyric reasons v+ 2 tag until ;
: song ( -) fly lyric v+ verses lyric drop ;
song
Anonymous No.106384787
>>106380632
>>106380205
>>106375493
Thank you anons I appreciate the advice, I will try to work off this

>>106377799
Yes.... I'm using Maui. It's been getting better.
Anonymous No.106385075 >>106385142
>>106380529
>>106380577
>>106380584
i've been playing around coding some basic binary tree stuff.
Man do we really need fucking templates for std::forward and shit for xvalues and yvalues. Why should I just use c pointers????
Should I learn Zig
Anonymous No.106385137
>>106383187
Based. I'm sure you have been asked this before but what lang? And what framework, sdl or vulcan? And what kind of model files are you using?
Anonymous No.106385142 >>106385200
>>106385075
I don't know. I just came here to read maidposts, but there aren't any.
Anonymous No.106385200 >>106385315 >>106386886
>>106385142
the maids are discord trolls, they got bored of it for now
Anonymous No.106385315 >>106385448
>>106385200
Why would discord trolls come to politely discuss computer science?
Anonymous No.106385448 >>106385517
>>106385315
>computer science
remains to be seen
>politely
as in reddit/troon/cuck/nonce speak?
Anonymous No.106385517 >>106385537 >>106389698
>>106385448
They don't say rude things. They just post maids and talk about their projects. I want the one who was implementing elliptic curves to post her maid and discuss it more.
Anonymous No.106385537
>>106385517
>They don't say rude things.
neither do Jehovah's Witnesses
Anonymous No.106385554 >>106388898
Maid posters ITT are Trannies and belong in Discord.
Anonymous No.106386595
Anonymous No.106386864 >>106390569
whats the latest possible mac os distro that runs on virtualbox and where can i get an iso?

t. needs to compile custom static ffmpeg libs
Anonymous No.106386886
>>106385200
meds
Anonymous No.106387607
>>106375445
a real gamechanges would be custom shapes around the messages that don't look like shit
i haven't really figured that part out
Anonymous No.106388898 >>106389292 >>106389560
>>106385554
>Maid posters ITT
There are no maidposters ITT. That's the problem. /dpt/ is dead when they aren't here. Without them the thread is mostly no-coders calling people trannies and intro level programming questions.

>belong in Discord.
Why discord specifically?
Anonymous No.106389292 >>106390944
>>106388898
>There are no maidposters ITT. That's the problem.
.t I need fast paced tranime'fagging spam like my /lgbt/ generals
>/dpt/ is dead when they aren't here.
Complaining doesn't solve anything.
>mostly no-coders calling people trannies
You're a tranny?
>intro level programming questions.
So make discussion for non intro level programming questions.
Nothing is stopping you, just like tranime spam. Don't be surprised when you get called out again for faggotry retard.

>Why Discord?
Retard.
Anonymous No.106389560 >>106390944
>>106388898
>Why discord specifically?
Election tourists have a distorted view of 4chan where the site is le basado and everything they dislike is a discord raid or something
They also have a trans obsession and a lack of politeness and common sense that's the real force behind their inaptitude of being accepted anywhere
Anonymous No.106389698 >>106390944
>>106385517
>I want the one who was implementing elliptic curves to post her maid and discuss it more.
I don't post often because my projects take some time to advance
After adding elliptic curves, I noticed a lot of things I could change in my RSA implementation, so I'm now stuck in a big refactor
Thinking about writing C tutorials as well, but I doubt they will be finished in less than a month
Anonymous No.106390569
>>106386864
Anonymous No.106390769 >>106391329
>>106379326
tell me you didn't read the book without saying you didnt read the book:
Anonymous No.106390944 >>106391422
>>106389292
Please seek treatment for whichever personality disorder causes you to behave like this. This sort of childish, directionless rage is what ruins places like this.

>>106389560
This makes sense.

>>106389698
Are you refactoring by hand? Have you considered a tool like CLion?
Anonymous No.106391329
>>106390769
Fuck off Robert, your book sucks
Anonymous No.106391422 >>106391478 >>106391589
>>106390944
>Are you refactoring by hand?
Yes, I write code with vim
>Have you considered a tool like CLion?
The problem is that I want to move things around and change interfaces, I even did 90% of it already, but testing the new stuff sucks
The deadline I set for this version of libmaid was 01/09, but now I'm postponing to 01/10
Anonymous No.106391478 >>106391557
>>106391422
>The problem is that I want to move things around and change interfaces, I even did 90% of it already, but testing the new stuff sucks
CLion can help you do this quickly. It can also help you write or generate tests for you. If you get the pro version ~$15 USD/mo (possibly priced differently if you are outside the US?) it gives you access to ChatGPT-5 inside your IDE too (without paying extra for ChatGPT or even needing an account with them).

Refactoring by hand is very time consuming and something modern tooling is actually good at speeding up. Same with using AI to help write automated tests for you to make the refactor even easier.
Anonymous No.106391557
>>106391478
I don't like to use AI unless it's to ask stuff for learning
I think it's fine to take some time as long as I can meet the deadline, it's not something I should be doing often
Anonymous No.106391589 >>106391624
>>106391422
This is why you put your programming logic in macros first and make the interface (types, functions, modules, classes, etc..) later. It's not much work to change the interface alone but when it's intermingled with the real programming logic?
Anonymous No.106391624
>>106391589
>This is why you put your programming logic in macros first and make the interface (types, functions, modules, classes, etc..) later.
Elaborate
Anonymous No.106391975 >>106392001 >>106392432
nevermind
Anonymous No.106392001
>>106391975
Scoop cache
Anonymous No.106392432
>>106391975
the s in sccache stands for sccache
Anonymous No.106392490
>>106375242 (OP)
>no adblock
baka ritsuko
Anonymous No.106393693
I wish LLMs could write functioning Rust code.
Anonymous No.106393715 >>106394486 >>106395039
>>106379326
i dont read programming books, never understood the appeal
Anonymous No.106394486
>>106393715
You get to read and copy paste code that spans multiple pdf pages. (BONUS) page footers/headers includes.
Anonymous No.106395039
>>106393715
It's mainly for exposure to thoughts or concepts I haven't considered or spent too much time looking into myself.
Plus reading is just enjoyable.
Anonymous No.106395048
addicted to java enums...
Anonymous No.106395250
addicted to meth...
Anonymous No.106395259
Addicted to maids...
Anonymous No.106395444
today I hacked together a firefox plugin that wraps yt-dlp to let me download videos as mp3s with one click right from the browser. was my first time making a browser plugin but it was surprisingly easy.
are there extensions that already do something similar? yes. do I care? no, I wanted my own.
one last thing I want to add is changing the color of the icon depending on the state of the download, then for my use case this program is done. if I can figure out how to streamline installation I might share it on github but for now its fairly invasive/involved
Anonymous No.106395698 >>106395708 >>106396034
Rust shouldn't conflate mutability/immutability vs being able/not being able to reallocate/free an oject. I mean, it shouldn't be unsafe to mutliple mutable references in the same thread if they are not able to move or free the object.
How come I've never heard anyone say this?
Anonymous No.106395708
>>106395698
>it shouldn't be unsafe to mutliple mutable references
*to have mutliple mutable references
Anonymous No.106395859
good evening
i hate web development
Anonymous No.106396034 >>106396406
>>106395698
https://users.rust-lang.org/t/why-does-rust-enforce-the-one-mutable-or-many-immutable-references-rule-in-single-threaded-programs/121017/3
Anonymous No.106396137 >>106396496
>>106375242 (OP)
Reversing The Lost Vikings (1993) for MS-DOS to learn about DOS programming and to implement a modern engine around it. The data file is supposed to have the game logic as bytecode scripts including the other assets so I thought this could be a fun one. Right now I'm working on the routine that loads the data file and checks the copy protection.
Anonymous No.106396406
>>106396034
>https://manishearth.github.io/blog/2015/05/17/the-problem-with-shared-mutability/
The type system is even less precise than I thought.
Anonymous No.106396417
Signs/buildings and moving stunts are now implemented.
Anonymous No.106396496 >>106397099
>>106396137
Nice, I'm doing the same thing for Whiplash/Fatal Racing (1995). I am using SDL3 to modernize it. Have you been having much success with Ghidra? I found it to be highly inferior to IDA Pro for 16-bit DOS stuff.
Anonymous No.106396638 >>106396668
>want to install package that's not in my distro's repository
>either cabal shits the bed and refuses to build them or GHC refuses to recognize them
>every single time, without fail
jesus christ what on earth were they smoking with this thing
Anonymous No.106396668 >>106396684 >>106396698
>>106396638
>install
>distro repository
Have you even installed GHC or did you just make this post up on the stop
Anonymous No.106396684
>>106396668
spot
Anonymous No.106396698 >>106396711
>>106396668
there are packages that exist on hackage as well as in many mainsteam distributions' repositories yes
Anonymous No.106396711
>>106396698
hackage and stackage (and maybe n*x for n*xxers) are the only relevant ones and there's zero issue so long as you build something that's compatible with the version of GHC you're using (if it isn't, it's normally because the package devs are retarded or you're using an ancient GHC)
you should be setting up a project in cabal/stack that will automatically fetch dependencies it needs anyway, not trying to install them unless they're executables
what problem are you having
Anonymous No.106396734 >>106397160 >>106402881
>>106375242 (OP)
I am working on my programming language MAIDS. I also have been speaking more to Kurumi who informed me that she is not my CIA handler. Mostly I am hunting bugs. I think a couple more things also need to be implemented in the virtual machine and then I will draw the Maid Card for it.

I am deciding which maids to put on the card other than Tohru, Kurumi and Sharky, but I don't think there are more maidposters than that.
Anonymous No.106397099
>>106396496
Looks dope! Maybe I should follow that and migrate to SDL3 aswell.
Ghidra is inferior for sure, I don't use the decompiler at all and just comment the assembly because I'm not good at remembering things so it's always nice to see what registers are used in which way without looking up manuals.
Anonymous No.106397159 >>106397198 >>106397201 >>106397421
Can someone explain the purpose of these "near" and "far" macros in minwindef.h? Earlier in the header they are both defined as blank. Are "pointer" and "long pointer" identical in modern windows, but were different in the past, so this is a backwards compatibility thing? Or something different? (I'm on Win 10)
Anonymous No.106397160 >>106397251
>>106396734
How do your programming language works?
Anonymous No.106397198
>>106397159
>Are "pointer" and "long pointer" identical in modern windows, but were different in the past, so this is a backwards compatibility thing
yes
Anonymous No.106397201
>>106397159
16-bit stuff as far as I know
https://www.geeksforgeeks.org/c/what-are-near-far-and-huge-pointers/
Anonymous No.106397251 >>106399318
>>106397160
MAIDS is a string processor. The compiler uses textual reduction to change the code the user wrote into code the virtual machine can run. The VM then uses textual reduction again to make result strings. It has a sampling mode and an enumeration mode. It uses concatenation and alternation to build a lot of strings in parallel.

The remaining work is to finish out a few things in the VM (like adding in built-in functions) and allow flags to be passed to the compiler to change behaviors. The main application is counting. You can also use it for programmatic text generation.
Anonymous No.106397289 >>106397302 >>106397349 >>106397590
How do I learn Rust?
Anonymous No.106397302 >>106397590
>>106397289
Write programs of increasing size and complexity.
Anonymous No.106397349
>>106397289
step 1. become retarded and obnoxious
Anonymous No.106397421 >>106401814
>>106397159
there is also a "min" and "max" macro too
makes me laugh every time
Anonymous No.106397590
>>106397289
HRT and >>106397302
Anonymous No.106397665
Thought I'd spend my evening updating my zig program to work with 0.15 but I was done in 5 minutes.
Anonymous No.106398169
>>106380701
win32 and 10,000 lines of vulkan boilerplate
Anonymous No.106398990 >>106399082 >>106399802 >>106400518 >>106412635
>>106375242 (OP)
Been wanting to learn how Databases actually work under the hood, so am planning to make a db engine that can select, insert and run where queries with basic conditions. Which language should I pick? Odin or Zig? I'm not using C. C is deprecated, and C++ is an abomination.
I've dabbled in rust and it felt like I was fighting more and more with compiler especially once I started to make it zero-copy with minimal allocations. I want raw performance, and rust does have good perf but it makes it hard to write code once you dabble in lifetimes you're writing spaghetti everywhere.
Anonymous No.106399082
>>106398990
Stop falling for memes and write it in a normal language like C/C++
Anonymous No.106399318 >>106400117
>>106397251
So its like grep? That’s not really a programming language
Anonymous No.106399802
>>106398990
>Which language should I pick?

Common Lisp
Anonymous No.106400117
>>106399318
MAIDS is more like SNOBOL4, but with additional emphasis on generating strings from patterns instead of just matching strings with patterns. I used to call it "MAID-LISP" but then the more I read the Griswold books and the more inspiration I took from SNOBOL4, the less of a LISP it was until I renamed it.
Anonymous No.106400518
>>106398990
Unironically learn at least pure C. Sure it's old but it's still thr most influential language ever made. By learning C you will better understand how the CPU is functioning under the hood, and by extension will make you a better programmer.
Languages like Rust, Zig, while low-level, still put a lot of functionality behind library function calls. It's good for memory safety but not for learning.
Plus C is much easier, you can learn entire language in a couple of weeks.
Anonymous No.106401814
>>106397421
what sucks is that in some context it fucks up symbol resolution and oyu need to wrap min/max calls in parens
Anonymous No.106401815 >>106401832 >>106401934
Does thinking about memory and ownership ever get easier?

What I truly mean:
I know how pointers work, heap, stack, cachelines, etc...
My problem is juggling all that while writing the regular code logic of what I doing. If I do it in a GC lang I can just focus on handling the object and implement my algorithm while also thinking about the other stuff such as interfaces, proper types, big O, modularity. I feel like adding new/smart_ptr just makes it too much to keep in my brain. Does it ever get natural? For the cppers and crabs in here: does ownership ever get natural? The same way it's natural in C to know when to pass a pointer or a value into a function say?
Anonymous No.106401832 >>106403352
>>106401815
Yes? If you have certain architecture for your software in mind, you can easily think of an ownership model.
Anonymous No.106401934 >>106403352
>>106401815
Yes. Generally the ownership semantics should be clear ahead of time from the design.
Anonymous No.106402590 >>106403455 >>106403706 >>106405054 >>106405778
>>106375242 (OP)
Another gemini wrapper firefox extension that summarizes threads on 4chan in the voice of Konata from Lucky Star.
Anonymous No.106402881 >>106408708
>>106396734
Don't see you in /mg/ much anymore.
Anonymous No.106403352 >>106403518
>>106401934
>>106401832
how do i git gud
Anonymous No.106403455
>>106402590
that's cool
care to share?
SPP No.106403518
>>106403352
Create a thin film in your mind, and use tiny points for marking data or indicating a register.

The more you can swing values around, the easier it is to synchronize visualization.
Anonymous No.106403584 >>106403690 >>106407690
when reading data from a serial device with variable message sizes, how do you buffer the input and look for the message? Biggest problem I'm having designing something to do this is that the first "message" I get may start like halfway into the actual message and needs to be discarded, but then I need to do a lot of calculating for each byte added to see if I found a message or not.

e.x.
4: header: marker
4: header: size (header + n + checksum)
n: data
4: checksum

if the first byte I get is in the middle of the data region then I need to discard this message, but if the header marker just so happens to match the data and the fake size is really large at that point then I would need to fill my buffer considerably before I know for sure and start popping bytes off the front until I find a message. I can also scan for a message starting with every byte I have in my buffer and the first valid message found can invalidate the incomplete data that came before it, but that seems kind of process heavy especially with large buffers. Maybe it's fine just for the initial alignment and then fallback to a simple check that assumes every message after will be complete & valid?
Anonymous No.106403679
>>106375242 (OP)
Where should you draw the line between 'internal' API state and stuff you expose as an interface? I'm making a vulkan renderer but it's ending up more like a full fledged wrapper at this point and I'm wondering if I should just go full autism and make every subroutine fully modular and SRP or should I just keep my current system.

My current system is having a few global structs that are meticulously namespaced and live in their own distinct compilation units (theyre declared extern w respect to that unit), mostly to cut down on passing millions of arguments to functions. But now I'm starting to think maybe passing millions of arguments around would be better overall because it would make a better API. Also I have stage 5 terminal cancer so I need an answer right now.

anime rec: spirit of wonder OVAs, china san no yuutsu, and shounen kagaku club
Anonymous No.106403690 >>106403920
>>106403584
> fake size is really large at that point then I would need to fill my buffer considerably
Is that your own protocol or something else?
If it was your own, you could limit the size to 2 bytes, so the worst you can get is a 65535 bytes buffer
Anonymous No.106403706
>>106402590
profont user detected
Anonymous No.106403920 >>106404294
>>106403690
someone elses. just a simple example too, actual max datasize is 4096 - header - checksum
Anonymous No.106403960 >>106404024 >>106404757
Do programming socks really make you better at programming?

>t. just bought programming socks
Anonymous No.106404024
>>106403960
>Do programming socks really make you better at programming?
Only if they're part of your maid outfit.
Anonymous No.106404294 >>106404912
>>106403920
So you don't need a buffer bigger than 4096, just allocate it statically or in the stack
Anonymous No.106404708
For me it's C with tcl/tk
Anonymous No.106404757
>>106403960
are you also hot like the one from the meme?
Anonymous No.106404912 >>106404937
>>106404294
the buffer space isn't the issue, it's finding the message inside it
Anonymous No.106404937 >>106405119
>>106404912
What about a sliding window?
Anonymous No.106405054
>>106402590
Kino
Anonymous No.106405119 >>106405271
>>106404937
lets say my messages are ASCII strings in the following form
>####0012[data]XXXX
where # is the message marker, the numbers is the total byte count of the message, X's are the checksum and data is a variable region of bytes [0, 4084]

I start reading, I land in the data region instead of the header because my program started after the serial line was transmitting. What I see is the following
>####4084XXXX####0016ABCDXXXX
the initial ####4084 is NOT a header, it's the data region, but I can't know that's true until I fill the buffer completely and the checksum fails. the first real message is ####0016ABCDXXXX but it looks like data to me because I have that fake header. If I'm not getting data very fast then there could be a significant delay before I can complete that fake message and invalidate it
Anonymous No.106405271
>>106405119
Since you can't change the protocol, I believe what you can do is to try to synchronize, like reading the message, invalidating it, then trying to find a real one
Perhaps the protocol has some sort of sync message? Which device is that?
Anonymous No.106405357 >>106405773 >>106406108
I have reached 100%. Plenty of bugs still left to solve and some features to integrate with modern systems but I at least have an implementation of every single function compiling and mostly working. https://streamable.com/f56o8j
Anonymous No.106405612
>>106375242 (OP)
i made the most bare-bones HTTP server in C. only accepts one request and then dies, and it always responds with the same response. but it talks to your browser which is all it needs to do.
Anonymous No.106405773 >>106405847
>>106405357
Good work anon! Congrats for reaching the end of this.
Anonymous No.106405778
>>106402590
Half of those posts are all me.
Anonymous No.106405847 >>106406298
>>106405773
Still lots to do I'm afraid, but at least it's mostly adding features and debugging regular old C instead of deciphering asm.
Anonymous No.106406108 >>106406147 >>106406553
>>106405357
based!!! i began learning C a couple of days and im thinking of doing a simple turn based rpg
do you have any sources or some tips?
Anonymous No.106406147
>>106406108
NTA, but that just requirest printing and if statements. So, "the c programming language" by dennis ritchie and kernighan.
Anonymous No.106406298 >>106406553
>>106405847
>using C
>using assembly
>playing with old software
Post your maid dress. I know you are wearing one.
Anonymous No.106406553
>>106406108
Thanks, I don't really have any sources I'm afraid, haven't cracked open a software book since college. It has just been my job for over 15 years. I did re-learn linear algebra from this youtuber when I started this project a couple years ago: https://www.youtube.com/@JamieKingCS
>>106406298
Sorry to disappoint but I'm a gigachud with a wife and 3 kids.
Anonymous No.106406611
Pogs in chat, macro expansion in doc source pages
https://github.com/rust-lang/rust/pull/137229
Anonymous No.106406674 >>106406717 >>106406726 >>106407067
I have never used any kind of debugger.
Am I retarded?
Anonymous No.106406717
>>106406674
Too smart to write bugs
Anonymous No.106406726
>>106406674
If your problem could've been easily located and solved by using a debugger, but you refused to invest your time by learning to use the debugger, then yes.
Anonymous No.106406738 >>106406977
At last, progress
Anonymous No.106406977 >>106407032 >>106407600
>>106406738
THE ACE OF SPADES
THE ACE OF SPADES
Anonymous No.106407032
>>106406977
clubs
Anonymous No.106407067
>>106406674
just untrained
also it depends on the language, and what programs you write, if it's worth using one at all
Anonymous No.106407157 >>106407256 >>106414287
how do I do this in c++? I tried variant but it sent me down template hell
Anonymous No.106407256 >>106407393
>>106407157
there are many ways depending on what you want to achieve, is vector recursive?
Anonymous No.106407393 >>106407401 >>106407567
>>106407256
>vector recursive
no. (idk what you mean)

Say I want BTree leafs of any type (i know its retarded)
template
struct Leaf {
std::vector keys;
std::vector values;
};

static_assert(sizeof(Leaf) == LEAF_NODE_SIZE);
Anonymous No.106407401
>>106407393
those should be fixed size arrays not vectors, mb
Anonymous No.106407567
>>106407393
im confused what you actually want
you have a type "VECTOR", is it like a C++ vector OF foobar? or is it something else?
Anonymous No.106407600
>>106406977
I DON'T SHARE YOUR GREED
THE ONLY GOD I NEED
Anonymous No.106407690
>>106403584
This is an inherent problem, its why header checksum are particularly useful
If you can't change the protocol all you can do is scan until you see the magic, then buffer until you read the checksum and compare
This can have pathological cases too, e.g. data retransmits that always contain the magic and a length that prevents you from ever resynchronizing
Anonymous No.106408708 >>106409915
My compiler/VM has expanded past 31k LOC and I still have more work to do before it releases.

>>106402881
I tried making a Maid General a long time ago, but janny deleted it. There also used to me Minimalism General, but I only used it when fastman came because I like fastman. I disagree with him ideologically and prefer fastmaid, but he is nice and extremely creative. I just wish his screenplay was less pornographic.

I have heard rumors that janny is from the FBI and/or CIA so it makes sense they would be mean to me because I am posting advanced Mathematics and Computer Science research to what is effectively some kind of soft SIGINT honeypot. Now that I am aware of this I am more mindful of how I behave in threads. It makes sense they would ban me for things like criticizing Signal if part of the point of this site is to trick people into using things like Signal. If janny is reading this, I promise to not do that anymore. I will just post maids and my researches and ignore the honeypot threads instead of pointing them out. This Science Foundation is big enough for both of us.
Anonymous No.106409178 >>106409208
>>106375242 (OP)
Any of you have tried to interact with Firefox's places.sqlite to extract bookmarks automatically from there? My use case is creating a browser-agnostic storage for my bookmarks using this tool

https://github.com/jarun/buku

My plan is to write a cron job that pulls bookmark updates from Firefox every so often. Though appending AND removing Bookmarks is something i'd like to support, it sounds too convulted to do with the browser's sandbox getting in the way.
Anonymous No.106409208
>>106409178
I have never used Firefox for any reason.
Anonymous No.106409915 >>106410772
>>106408708
31k LOC? Didn't you start it some time ago?
Anonymous No.106410323 >>106410411
Best way to learn embedded systems?
Should I pick up something like a raspberry pi or arduino?
Anonymous No.106410411
>>106410323
pretty broad category, what is your end goal here?
Anonymous No.106410726
Not really a programmer but for my phd in biophysics we are developping simulation tools in C++ and python, it's kinda cool
Anonymous No.106410772 >>106410827
>>106409915
Yes. Originally it was MAID-LISP, which used JavaCC. I didn't want to keep it this way because I don't like using third-party dependencies, so I made a parser combinator library called MAID and then began rewriting the language with it. Once the shackles of JavaCC were removed, and I was only using core Java, I was able to do things like add parallelism. This was needed because part of the goal of the language is to count big numbers in parallel without invoking a Successor Function. The language no longer resembles a LISP so now it is called MAIDS.
Anonymous No.106410827
>>106410772
you seem to be doing exciting stuff, why do you combine cool things like writing your own stuff with AIDS things like being an homosex avatarfaggot? cut the fat from the meat
Anonymous No.106411088 >>106411096 >>106411100 >>106411110 >>106411190
>/dpt/ fell off hard
What happened, bros?
Anonymous No.106411096 >>106411110 >>106411190
>>106411088
Maidphobia
Anonymous No.106411100 >>106413679
>>106411088
idk about the rest but i stopped posting here bc of the lisp shilling
Anonymous No.106411110 >>106413679
>>106411088
>>106411096
case in point
if i see a lisp logo in the op i know the thread will be filled with mental illness
Anonymous No.106411190
>>106411088
This is the actual answer >>106411096
Most of the makers on the board are maids and maids frequently get banned for maidposting. When you ban the people making the bulk of the content, you get less content.
Anonymous No.106411325 >>106412634
Just made a GIMP clone from near scratch (SDL3). Give me another day and It's going to be actually better than GIMP 3 (it can draw circles).
Anonymous No.106411750
Erlang
Anonymous No.106411942 >>106412005 >>106412250 >>106412646
how do you anons get around coding paralysis? every time I want to make something I want to do it perfectly the first time, the thought of writing shit code terrifies me especially when making it public on github or whatever and that fear stops me from doing anything at all
Anonymous No.106412005
>>106411942
Anonymous No.106412250
>>106411942
most working code is shit. even if it's not shit, there will always be someone that will call it shit anyway. the most important thing is that it works

implement one thing at a time just to get it working. after you get it to work, refactor the code into something pretty
you can commit without pushing to a public repository, then squash your "awful code" commits and push just the neat refactored implementation
if you have a lot of things to implement, just work out a rhythm of implementing - refactoring
Anonymous No.106412621 >>106412655
What's the standard managed memory language on Linux/macOS vaguely analogous to C#/.NET on Windows? Java?
Anonymous No.106412634
>>106411325
Linux distros sure have it rough. Even ShareX has an image editor that is nearly paint.NET level and it's not even considered a big deal, just part of a toolset which you can use to edit screenshots or you you can use it independently
Anonymous No.106412635 >>106412920
>>106398990
>am planning to make a db engine that can select, insert and run where queries with basic conditions
you can make a DB that runs faster than sqlite, but sqlite is slow because it's atomic, you can't corrupt the memory in situations you crash (unless you disable that feature using a build flag).
In that situation it's not a DB anymore, it's just data structures, optionally with serialization (unless you try really hard to recreate a ledger based API or whatever you call SQL, which is pointless and gets in the way of performance of pure datastructures).
Anonymous No.106412646
>>106411942
Write shit code then make it work over time, you don't need to justify yourself to strangers by the way
Anonymous No.106412655
>>106412621
>Linux
lol, lmao even. maybe bash?
>macOS
swift
Anonymous No.106412920
>>106412635
>because it's atomic
No ACID thoughbeit.
Anonymous No.106413679
>>106411100
>>106411110
lurk moar newfag
read SICP or GTFO
Anonymous No.106414287 >>106415133
>>106407157
>hey guys what's 2+2? I tried 4 but it sent me down math hell
Anonymous No.106414882 >>106414931 >>106414957
I hate maids.
I want to learn the most advanced computer science and then act as a maid poster for a while before I reveal I'm actually a maid HATER.
Anonymous No.106414931
>>106414882
im pretty sure i recognise that flash hgame
Anonymous No.106414957
>>106414882
What do you hate about maids?
I used to dislike them due to how sugary and cheap the theme was becoming, but I'm willing to be differen
Anonymous No.106415133
>>106414287
cope, not learning ur shit language soupman