[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]


[Advertise on 4chan]


File: so over.jpg (1.08 MB, 2379x1159)
1.08 MB
1.08 MB JPG
What are you working on, /g/?

Previous: >>107874369
>>
Post your code NOW
>>
>>107911916
i'm surprised she could find enough food to grow boobs like that
>>
File: 03ccc2eb751e7e32.png (2 KB, 201x70)
2 KB
2 KB PNG
>>
File: intrusive-thoughts.jpg (46 KB, 1000x625)
46 KB
46 KB JPG
contemplating using C++98
>>
>>107911932
hgnhnnn... plop
>>
File: what (4).png (4 KB, 500x500)
4 KB
4 KB PNG
>>107911916
i can not understand this image. someone please explain
>>
>>107912251
Russian streaming thot wishing she could RETVRN to space age optimism and her own schoolgirl innocence.
>>107912216
for smoother service transitions, create a socket with a temporary name and rename it into place when you're ready to accept connections on it. with renameat2 you can simultaneously swap with the old socket, and then connect on it yourself to tell the old daemon to finish any work and shut down.
>>
File: 1742351346456939.jpg (42 KB, 323x366)
42 KB
42 KB JPG
>>107912251
this can't possibly be your first time seeing turdies use llms
>>
>>107912301
>reparations for slavery
Probably an antisemitic language like Haskell
>>
>>107912524
i don't think the image is AI generated. if it is then boy oh boy have we come a long way since dalle generated adolf hitler on icarly
>>
Genuinely what the fuck is up with pointer mutability
>>
>>107912216
>hgnhnnn... plop
kek
>>
>>107912251
Socialism vs capitalism
>>
>>107912251
I don't blame you, it really is peak emotion without thought.
But long story short. Chauvinistic ideal without substance.
>>
>>107912251
>>107912668
Not AI btw: https://www.pixiv.net/en/artworks/115370079
The description is a reference to the soviet song https://en.wikipedia.org/wiki/The_Beautiful_Afar_(song) , which I've always heard of with the translation "wondrous future", but whatever.
>>
>>107912629
Okay, I got it now. It's just that there are 3 layers of mutability to describe a pointer
>>
>>107912720
The reflection in the puddle on the right convinced me that it's not AI. The only thing I find weird about it is the belt that goes around the chest of the girl on the right, partly over and partly under the shirt. That looks like the kinda "stylistic choice" AI would make.
>>
>>107912668
oh i thought the whole image was communism. i might be retarded
>>
File: untitled.png (41 KB, 800x600)
41 KB
41 KB PNG
>>107911916
A lightweight code editor that will have context aware AI code assistant and work on older Windows systems as long as they can run .Net Framework 2.0
>>
>>107912769
what convinced me it wasn't AI is that the girl's hands are positioned such that it is clear she is pressing against a wall, likely hallucinating the scene, match girl style, considering the drugs scattered around the floor. as for the belt, it is there for the same reason as the choker and the thigh band and the torn socks: it paints a picture of degradation and honestly man it's hot as shit
>>
File: 1722558627640982.gif (3.38 MB, 480x368)
3.38 MB
3.38 MB GIF
>>107912890
Based, I kneel
>>
>>107912553
>have we come a long way
you've just gotten dumber and more aids ridden
>>
>>107911916
I don't care about political ideology I want to save that whore.
Oh right, dpt.
Is javascript good for you?
>>
>>107911916
>What are you working on, /g/?
I started CS50p. I iz gonna learn to program.
>>
File: 1671458130652329.jpg (79 KB, 900x675)
79 KB
79 KB JPG
>>107912857
It can never be just communism, it always needs the complementary for fabricating this "better alternative" as well as the scapegoat for when it inevitably fails again.

Also you can easily understand the state software is currently in by acknowledging that the subhumans populating this board (and the lonely, terminally online tolerating them in need of a group to belong to) are supposed to be the alternative to the programming-socks subhumans.
>>
>>107911916
>What are you working on, /g/?
I am not coding rn. Pls don't judge. Thanks
>>
>>107913765
name every programming language you're not using then
>>
I LOVE radix sort
>>
>>107913826
No, but I once used bash to solve a specific task
>>
>>107911916
>What are you working on, /g/?
Checking PRs. Someone suddenly started making merge requests every few days, fixing bugs, implementing requested features, etc.
It's not unwelcomed but it sure feels like having second job. At least I know that people find the project useful.
>>
>>107913909
>feels like having second job
I hope none of my projects ever become successful.
>>
>>107914009
Just put a cuck license on it and say no to PRs
>>
>>107913831
rad
>>
https://github.com/gawlas/IBM-PC-BIOS/blob/master/IBM%20PC/PCBIOS.ASM#L266

Is it a usual thing to do in embedded programming to check wether the processor's flags and conditional jumps work correctly during reset?
>>
>>107914133
Never heard of that.
Just because it's the boot sequence, i wouldn't count ibm pc as embedded system.
I would assume similar checks have to happen in safety critical system though. But they are a whole different world anyways. So no in modern computing i think that shit is not done. Registers just get cleared on reboot
>>
>>107912720
grim, the slavaboo completely missed the point of the song
>>
>>107914191
>Just because it's the boot sequence, i wouldn't count ibm pc as embedded system.
I mean in both cases you are dealing with bare metal so I would think that both general OSes and embedded (and everything with a cpu) would do the same general things when it comes to the initialization of the system.
It's neat though, that and the part where it copies 0xffff (and later 0) though all the registers and check that the last register in the chain has the original value.
>>
All allocations in the context tree are between 2 and 2048 bytes, most allocations are going to be small (between 2 and 32 bytes), so it's worth handling small allocations with minimal overhead. My allocation strategy is then
- For allocations < 15 bytes, use a slab allocator with 2 byte slots, with a bitmap for tracking slot occupancy, the worst case overhead is then 7 bits + 1 byte for a 13 byte allocation.
- For allocations >= 15 bytes, use a free-list based allocator (where the pointer and size are inside the empty regions, this can fit in 8 bytes), with 2 byte size metadata on each live allocation. The worst case overhead is 9 bytes (e.g. you have a 22 byte empty block and you allocate 15 bytes from it, 7 bytes is too small to fit an empty node), but it is also possible to have regions too small to allocate from (since min allocation is 15 bytes, but the smallest free-nodes are 8 bytes)
The threshold between heap types may not be optimal, I'll probably have to experiment with it.

Each allocation pool (a single instance of a slab heap or a list heap) is stored in ascending order by unused space. We then try to allocate in sorted order, i.e. try to allocate from heaps with as little available space as possible first to maximize occupancy. The free list is also in ascending order by size to try to use the smallest free-block within a pool first. When I want to compactify the heap after pruning (since there is likely a lot of fragmentation after pruning), I can search the context tree for allocations in heaps with low occupancy, and realloc them into heaps with high occupancy. Then after compaction I release the pages backing any empty individual pools back to the OS.
Individual pool sizes likely also needs experimental fine-tuning, since the smaller I make them the more often I can release memory to the OS, but there is a fixed overhead per-pool and a performance penalty.
>>
>>107912301
Will it take into account the trillions in aid already wasted on Africa?
>>
>>107913427
what do you mean
>>
File: 1752953232206715.png (59 KB, 656x609)
59 KB
59 KB PNG
>>107911932
functional constructs in my toylang
>>
>dad tells me that studying online and working on projects is useless
>I just need to go back to college and finish my degree, then i'll magically land an internship (that don't exist) and get a real job in tech!
>I have to hear this speech from him every week
>he doesn't even work in tech and has been at the same company for a decade
thanks for listening to me rant, utwg got 404'd
>>
will cppreference ever been updated or have the feds assassinated the guy as part of the rust push
>>
>>107915016
ever be
>>
>>107914749
in J this is just
   +/ ^&2 (#~ 0=2&|) i.10
120
>>
>>107914749
in Ruby this is just
(1...10).filter { |x| x%2 == 0 }.map { |x| x**2 }.reduce(0) { |x,y| x+y }
=> 120

or, if you're gay:
square = -> (x) { x*x }
(1...10).filter(&:even?).map(&square).sum
>>
>>107915145
you're missing the printing side effects
>>
>>107911916
>What are you working on, /g/?
I don't even know what to call this thing but it's perfection.
>>
>>107915219
(1...10).select(&:even?).map { _1**2 }.sum
>>
>>107915235
   gay=:][echo
+/ gay ^&2 gay (#~ 0=2&|) gay i.10
0 1 2 3 4 5 6 7 8 9
0 2 4 6 8
0 4 16 36 64
120
>>
File: file.png (509 KB, 1509x1144)
509 KB
509 KB PNG
still making this horrid thing
>>
>>107915709
very funny name anon
>>
>>107915793
parametric
uncolored
stereo
spectral
invesion
>>
TIL sscanf can do dynamic memory allocation with %ms.
>>
>>107916393
scanf belongs in the trash
>>
>>107916393
for me, it's asprintf
>>
>>107916623
scanf does, but that's sscanf, and the only problem with %ms is that it uses very expensive malloc/free calls instead of a temp allocator.
>>
>>107916643
I think calling malloc and free very expensive is a bit schizophrenic.
It's not perfect and sure would bring your AMD Bulldozer to a grinding halt but we need to move past those days.
>>
>>107916819
>I think calling malloc and free very expensive is a bit schizophrenic.
you don't know what you are talking about
>>
>>107916858
Help is available.
>>
>>107916819
ok, then in OCaml that's just
(* no idea what print_name does *)
module Name = struct
let pp fmt s = Format.fprintf fmt "%s" s
end

let header input =
Scanf.sscanf input "header %s" (fun name ->
Format.printf "\
#ifndef %a_H\n\
#define %a_H\n\
#endif\n" Name.pp name Name.pp name)

better interactive I/O performance since OCaml's more aggressive about buffering.
>>
>>107916819
But malloc and free are very expensive. Most of the codebases I work on at work do not even implement them.
>>
>>107916940
or
ignore @@ Scanf.sscanf_opt

if you really want to ignore scanf failures like the C is.
>>
>>107916940
*better than scanf()
if you wanna go fast in io you use read() and write()
>>
im trying to sort directory items in some different ways in python; if i was in c i would want a
FILE* file
and
int* metadata
to load into mem (metadata being some chosen object of interest about the file, like filesize, a timestamp, etc) but in python theres no such thing as a file pointer. how big is a file object? (the thing returned by calling open())? would it make more sense to just keep the filename instead of that?
>>
>>107917085
... look at ulimit -a
$ for x in $(seq 1 1025); do touch $x; done
$ perl -wle 'for (<*>) { open my $f, ">", $_; push @files, $f }; print {$_} "write something\n" for @files'
print() on closed filehandle $f at -e line 1.
print() on closed filehandle $f at -e line 1.
print() on closed filehandle $f at -e line 1.
print() on closed filehandle $f at -e line 1.
>>
>>107917704
>'a'
>'z'
>32
32 has a name, you know: ' '
and no it's not perfect, I already posted OCaml
>>
>>107917085
os.stat
>>
>>107917727
I asked Gemini and it called me retarded for other reasons.
>>
My retardation made Gemi have a stroke.
>>
is there any white equivalent to abdul bari
the accent is so distracting



[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.