[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


🎉 Happy Birthday 4chan! 🎉


[Advertise on 4chan]


File: dpt.png (15 KB, 445x183)
15 KB
15 KB PNG
What are you working on?
Previous: >>106804517
>>
>>106827802
>unsigned long long int
in my machine this is u64
>>
>>106827802
>do some random math
>somehow get a more random number
If it were up to me I'd just the first magic number there. Maybe add it to the seed if you're feeling adventurous.
>>
>>106827819
On my machine it has no usecase.
using u8 = unsigned char;
using u16 = unsigned short;
using u32 = unsigned int;
using u64 = unsigned long;
using u128 = __uint128_t;

using i8 = signed char;
using i16 = signed short;
using i32 = signed int;
using i64 = signed long;
using i128 = __int128_t;

using f32 = float;
using f64 = double;
using f128 = long double;
>>
File: 1735906471531135.mp4 (453 KB, 1280x720)
453 KB
453 KB MP4
Thanks to the anons in previous thread, my dynamic array of Polygons which may contain dynamic arrays of Polygons ad-infinitum is working good enough for now. Using indexes for everything now instead of pointers, so it doesn't matter if realloc moves memory.
>>
>>106827900
what are you making there
>>
>>106827900
>realloc
>>
>>106827900
based
>>
>>106827900
Making a 3d modeler, anon?
>>
>>106827900
that looks really cool
>>
>>106827900
cool stuff
>>
>>106827900
Very based
>>
>>106827982
It's a level editor for my polygon-based 2D game project. I use raylib and nuklear as external dependencies, the latter is a GUI library.
>>
Been having a lot of fun learning C++
>>
>2025
>no good GUI library exists
operating systems were mistake
>>
>>106828874
uh, bro? your dom? your chromium?
>>
>>106828937
Hypertext markup language is not a user interface
>>
>>106828966
how did you post your retarded post then
>>
File: rly_pepe.jpg (108 KB, 1024x1024)
108 KB
108 KB JPG
>>106828872
>C++
>fun
>>
File: avatar.jpg (273 KB, 976x850)
273 KB
273 KB JPG
>>106829029
gtfo my thread nigger monkey
>>
>>106828874
Sad to say, Tcl/Tk is the only good GUI library. Things only ever went downhill from there.

At least it's still maintained to this day by dedicated and active core team, no matter how much everyone tries to gaslight you that it's "deprecated" and "looks old" or whatever other crap people try to say about it
>>
>>106829029
>>106829042
I hate both of you because you're frogs.
>>
File: news.jpg (840 KB, 1391x1405)
840 KB
840 KB JPG
>>106829084
I'm indifferent to your existence.
>>
>>106829029
Yes fun.
After some weeks or months of reading the rust book and trying to write some baby programs, coming back to C++ feels like a bliss
Shit just WORKS. The language lets me do shit.
>>
>>106829111
>weeks or months of reading the rust book
What? I spent 4 hours reading the book and was set for my first project.
>>
You had one job, Mossad.
>>
>>106829111
forgot to mention, maybe the most important thing:
The community is not overflown and run by raging troon faggots
>>
>>106829117
"weeks or months reading the rust book AND trying to write programs"
>>
File: 2024-01-28 16.26.06.png (775 KB, 1735x1030)
775 KB
775 KB PNG
>>106828874
My own GUI library is good (only works for me).
>>
>>106829263
That looks very neat, is it immediate mode?
>>
>>106828874
make your own gui toolkit
>>
File: output.gif (156 KB, 936x740)
156 KB
156 KB GIF
Do you guys enjoy computational geometry? Here is a program I made to find out triangulation.
>>
>>106829306
>immediate mode
what does it mean?
>>
>>106829361
Nice. And yeah, implementing ear clipping with hole support for >>106827900 was pretty fun, ngl.
>>
File: 1574255427218.jpg (43 KB, 600x649)
43 KB
43 KB JPG
>>106827802
>Have to implement a PDF service
>Backend is Java
>PDF lib is PDFBox
>Apache's own documentation is just an API reference
>Not a single PDFBox tutorial that wasn't made by an indian, be it video or text
>Reading a fucking tutorialspoint for the first time since 2013
Do I KMS myself right now or after the job is done?
>>
File: recording-33426456.webm (410 KB, 800x600)
410 KB
410 KB WEBM
I wanted to try "exiting animations" but it might be a mistake, it's kind of a nightmare.
>>
>>106828874
html
>>
fixed a double click bug in my gui toolkit
thinking about working on the rich text renderer again

>>106829616
>it's kind of a nightmare
how
you just interpolate geometry between two states with time
>>
>>106829616
Not that exciting, huh?
>>
>>106829869
It's a declarative library, so by calling the api functions you're basically building the node tree that you want for that frame. Before, there was just that one tree. But now because of the exiting animations, nodes should be able to stick around inside the real tree for a while, even if they are not part of the declared tree. So I have to rewrite some stuff to account for this.
>>
>>106830471
that looks like a bad api design to me
it's no longer declarative if the definition doesn't match the visual
a better api would let the user toggle the tree as hidden which triggers the hiding animation
then add/delete elements while it's hidden after it receives animation completion event
>>
>>106828874
what makes a GUI library good for you?
>>
>>106830926
>C API
>cross platform
>no ebussy
tcl/tk would be good but it has too many weird quirks and the text widget is just slow.
>>
I'm currently writing my own PNG decoder in C, lol. It's been a while since I've had this much fun programming. Reading the specification and figuring things out. Yeah... that's life. *unzips beer*
Now I'm debating whether I should implement my own deflate implementation or use zlib... Might as well go all in, right?
>>
>>106830966
I was writing something like that not long ago after doing CS50. And yeah, it was not only fun, but truly "empowering" so to speak.
It was my first time writing code that was not simple terminal baby projects, or simple webdev shit. Dealing with raw bytes and interpreting the data, working with PNG chunks and shit, it was amazing.
I was doing it in C as well and then translated the program to Rust just because.
I abandoned the project precisely after the deflate implementation, though. Got somewhat bored, ironically.
>>
File: carbon.png (818 KB, 2400x3516)
818 KB
818 KB PNG
>>106827802
>What are you working on?
String encoding utilities for my console/emulator

>>106827900
Nice, reminds me of elastomania
>>
>>106830962
>>C API
>>cross platform
>>no ebussy
Of course for the C API but it's irrelevant.

I'm talking about how it interacts with the underlying GPU API (OpenGL, Vulkan, ..).
If it allows you to talk to it directly?
how are widgets are compiled to GPU primitives?
can you put GPU rectangle/quads inside a widget (ex: a font library generates quads)?
does the GPU or does the GUI library does Z-sorting of the widgets?
how are events handled?
what does the GUI library state and data structures looks like?
>>
ImGUI C-API is a horrifying mess.
>>
>>106829468
Apache libraries are easy to use if you know the data format you're working with
just look up how the PDF format works, then the Apache lib should be basically self-explanatory
>>
Erlangchads win again
>>
Hey /g/, you're stuck with a terminal with no commands. No vi, emacs, nano, grep, echo, sed, mv, ls or even cat. But you gotta edit this file!
Thankfully, you got your trusty le - pure POSIX sh builtin line editor, which works in every single POSIX compliant shell, even the ones with absolutely NO external commands!

I wondered what could be done with pure POSIX sh builtins, meaning absolutely no commands like ls, mv, rm, touch etc. So I made a simple line editor with command/pipe capabilities.

Instead of worrying about variable size limits, it simply uses temporary files as buffers.
Files are created with :>, copied around by simply looping < "$file", everything works on current selection or other line numbers if provided. There's also janky teletype mode simply for the reason that I wanted to avoid the screen clear and other escape sequences.

It could be tidied up a bunch but I needed give you guys this great tool.
https://pastebin.com/DCGRTvSk
>>
>>106830962
>the text widget is just slow
that's probably the calculation of the metrics in the background; there's no assumption that all the lines are the same height, so metrics (the sizes of everything) get a bit expensive
>>
File: 30.webm (2.74 MB, 944x1032)
2.74 MB
2.74 MB WEBM
>>106831490
Here's a quick demo video of le in action
>>
>>106831493
Maybe someone should submit a TIP to the tcl core team proposing an optimisation, where you can force a text widget to have a fixed line height
>>
>>106830966
>or use zlib
for me it's miniz. Actually I took only the parts of miniz I needed and put them in its own file (~800 LoC).
>>
>>106831523
As someone who grew up with BASIC line editors on 8bit micros, i love it
>>
>reading K&R on pointers
>they use the /* */ comments while explaining what * does
Ooops, almost mixed the two. But I guess it's XP +1.
>>
>>106831528
feel free, but I advise writing the damn code first so that you have a patch (or branch) to go with it
people get real sour about unimplemented suggestions, especially when they come with demands to "work on my problem for free instead of your own ones that pay the bills!"
>>
File: file.png (9 KB, 695x55)
9 KB
9 KB PNG
>>106831605
reminds me, this warning is so fucking useless
>>
>>106831590
Thanks. I never used them, but line editor was most a shell can do with pure builtins.
But in the name of transparency, I just now realized I absentmindedly left rm commands in the cleaning function... Lines 108-113 should be.
lev_clean(){
:> "$lev_ftemp"
:> "$lev_ftemp2"
:> "$lev_ftempBAK"
exit "${1:-0}"
}
>>
>>106831490
Have a (you).
>>
I'm trying to use database DDL to represent the DB schema in RDF format.

The W3C stds are undecipherable to me (R2RMD).

Has anyone ever done something like that or knows of something that might help?
>>
>>106831997
Try also asking here:
>>106827664



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.