[ / / / / / / / / / / / / / ] [ dir / animu / cafechan / femdom / hisrol / leftpol / sg / tacos / vg ]

/tech/ - Technology

Catalog   Archive

Winner of the 36th Attention-Hungry Games
/alcoholism/ - The Attention-Hungry Games are the Dark Souls of Hunger Game Simulators
Name
Email
Subject
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Flag
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 3 per post.


File: 98e047e7e9b1ede⋯.png (152.23 KB, 374x600, 187:300, Black_2_White_2_Ghetsis.png)

 No.900164[Reply]

I'm fucking sick and tired of it, so I'm gonna ask some questions.

What programs can I use to accessibly monitor my internet traffic?

What is something I can read about to get a handle on how routing works, and how to understand the terminology used?

How the fuck can I, someone who doesn't know how to handle anything at the data-level, understand wireshark?

Is wireshark necessary? If so, how did you begin to understand it?

How do I avoid false positives and jumping at the wind?

What other programs can I use to protect myself from potential botnets?

I genuinely want to know, I'm tired of being led by the blind, I want to see things for myself!

Finally, I'm pretty sure that astroturfers are 25% of /tech/'s problem, and the remaining 75% comes from crabs-in-a-bucket faggots who'd rather "win" and be "right" in their minds than actually ATTEMPT to look for the truth.

 No.900279

>>900164

>What programs can I use to accessibly monitor my internet traffic?

wireshark (among others)

>How the fuck can I, someone who doesn't know how to handle anything at the data-level, understand wireshark?

practice, tutorials, books

>Is wireshark necessary? If so, how did you begin to understand it?

perhaps not. get glasswire (assuming winblows). its also a firewall. NOTE: this only monitors what's going in and out of your specific PC iirc, not the whole network

>How do I avoid false positives and jumping at the wind?

experience. are you already using umatrix? if not, learn it. have you already figured out how to properly configure a firewall? if not, learn it. knowing these will help when you start attempting to identify particular packets

>What other programs can I use to protect myself from potential botnets?

all you really need is an antivirus and a properly configured firewall, they say. you should also harden your OS and your browser

but, most of all, what you really need to do is INSTALL GENTOO:^)


 No.900296

>What programs can I use to accessibly monitor my internet traffic?

TinyWall if Windows.




File: 38c08733444d867⋯.png (83.84 KB, 512x512, 1:1, rust-logo-512x512.png)

File: c76db1c59ab13eb⋯.jpg (384.3 KB, 1400x933, 1400:933, steve klabnik a.jpg)

 No.869589[Reply]

The Rust team is happy to announce a new version of Rust, 1.24.0. Rust is a systems programming language focused on safety, speed, and concurrency.

This release contains two very exciting new features: rustfmt and incremental compilation!

For years now, we’ve wanted a tool that automatically can reformat your Rust code to some sort of “standard style.” With this release, we’re happy to announce that a preview of rustfmt can be used with 1.24 stable.

Back in September of 2016 (!!!), we blogged about Incremental Compilation. While that post goes into the details, the idea is basically this: when you’re working on a project, you often compile it, then change something small, then compile again. Historically, the compiler has compiled your entire project, no matter how little you’ve changed the code. The idea with incremental compilation is that you only need to compile the code you’ve actually changed, which means that that second build is faster.

As of Rust 1.24, this is now turned on by default. This means that your builds should get faster! Don’t forget about cargo check when trying to get the lowest possible build times.

This is still not the end story for compiler performance generally, nor incremental compilation specifically. We have a lot more work planned in the future. For example, another change related to performance hit stable this release: codegen-units is now set to 16 by default. One small note about this change: it makes builds faster, but makes the final binary a bit slower. For maximum speed, setting codegen-units to 1 in your Cargo.toml is needed to eke out every last drop of performance.

https://blog.rust-lang.org/2018/02/15/Rust-1.24.html

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1240-2018-02-15

232 posts and 37 image replies omitted. Click reply to view.

 No.900150

>>900092

But regardless of the language you have to "hunt" for packages. No languages std has everything.

>I remember spending hours to find a package giving a specific functionality because there were 10 others that were broken and I had to try each before finding out their shortcomings.

Sounds like every popular language tbh.


 No.900233

>>900124

This. They don't think. They just get told what to believe in school which is the most successful indoctrination method besides TV.

The jews use our tax money to finance them. What a great democracy in which only 50% votes because of 5% clause and non-voters and the 50% don't even get to decide anything because all parties in the Bundesrat apart from AfD have the exact same ideology and are basically SED split up in parts.


 No.900237

>>900233

*Bundestag


 No.900245

Is this the BILD forums??


 No.900250

>>900150

With a good enough stdlib, you can simply reimplement stuff if you really want to.




 No.899349[Reply]

What do you computer nerds listen to while writing programs? I'm looking for stuff that isn't distracting, and doesn't have any shitty vocals ruining my train of thought.

42 posts and 6 image replies omitted. Click reply to view.

 No.900074

>>900041

There is the music you enjoy listening to, the music you enjoy playing, and then the music you enjoy studying. They may overlap, but probably not.

>>899349

BGM streams and lo fi hip hop on youhooktube are a good go-to. Also ambient synth mixes.


 No.900077


 No.900138

File: 7a5c8d5e5fc061d⋯.png (178.25 KB, 232x322, 116:161, Image0005.png)

>>900046

How many times per year can you listen to Carmina Burana, really? Or the rest, for that matter?


 No.900165

>>899575

This anon knows how to properly channel the machine spirits.


 No.900181

while programming cybernetics I usually listen to cyberpunk music while my asian holographic gf dances in front of me.




File: 1d1bde70314c4c3⋯.png (13.66 KB, 200x200, 1:1, stratis.png)

 No.899874[Reply]

So I'm sure some of you are aware by now, but if not, RedHat is flat out dropping all support for BTRFS in the future.

https://www.phoronix.com/scan.php?page=news_item&px=Red-Hat-Deprecates-Btrfs-Again

A shame, as BTRFS has just recently made major progress towards eradicating its only real dealbreaker, broken RAID5/6 support.

>raid56 recovery: don't use cached stripes, that could be potentially changed and a later RMW or recovery would lead to corruptions or failures

>let raid56 try harder to rebuild damaged data, reading from all stripes if necessary

>fix scrub to repair raid56 in a similar way as in the case above

It's also still got the backing of SUSE, Facebook, Oracle, and Fujitsu.

However, RedHat has decided to go for its own solution, Stratis. You can read about it in depth here

https://stratis-storage.github.io/StratisSoftwareDesign.pdf

but here are their plans from their requirements list


1.
Make features easier to use in combination with each other: thin provisioning, snapshots, integrity, redundancy, multipath, encryption, hardware reconfiguration, monitoring, and a caching tier
2. Simple and comprehensive command-line interface
(a) Simple
i. Single way to do things
ii. Do not expose internal implementation details. Gives Stratis more implementation freedom, and of little value since internals are too complex to make manual user repairs practical
iii. User typically will not use on a daily basis
A. Consistent commands that a user can guess at, and probably be right
B. Require explicitness from the user for potentially data-losing operations, such as giving a “–force” option.
(b) Comprehensive
i. User must master only one tool
ii. Helps user learn:
Post too long. Click here to view the full text.
15 posts and 1 image reply omitted. Click reply to view.

 No.899952

File: 04c1ed7921dd9c5⋯.png (66.59 KB, 250x241, 250:241, B2442A8F-29D2-44A7-8028-14….png)

Anyone think this might have been done as a means of creating more competition between RHEL and SLES?

It’ll be a war of the ZFS clones! Stratis vs. BTRFS! Let the autism begin!

or not.

Im tired.


 No.899953

>>899952

More like Stratis vs ZFS. BTRFS is already dead.


 No.899960

>>899874

>in the future

I thought it was just because they didn't have enough people with experience with btrfs.


 No.900126

>>899953

still default on SUSE, still backed by Facebook, Oracle, and Fujitsu.


 No.900174

>>899960

well they're abandoning btrfs entirely according to that paper.




File: 9ebfd8ee0f0706f⋯.jpg (6.46 KB, 184x138, 4:3, linus-torvalds-2.jpg)

 No.899664[Reply]

>Of the many improvements to be found in the in-development Linux 4.17 kernel -- nicely summarized in our Linux 4.17 feature overview -- one of the features I've been anxious the most to begin benchmarking has been the reported power management improvements. Here are my initial power/performance tests of Linux 4.17 that for some systems is seeing a measurable drop in power usage, even in some cases under load while without sacrificing the performance.

>The most promising power management change in Linux 4.17 is a rework of the kernel's idle loop that may lead to some systems seeing their power drop by up to 10%+.

https://www.phoronix.com/scan.php?page=article&item=linux-417-power&num=1

Also, for the first time there were more lines of code removed than added. That's because some architectures got deprecated.

http://lkml.iu.edu/hypermail/linux/kernel/1804.1/06654.html

8 posts omitted. Click reply to view.

 No.899812

>>899680

With my X230 I would get better battery time with Windows.

Firefox is a big battery eater, that's why I have been using more GNOME Web lately

>>899740

They are not mutually exclusive. You will install, configure and never have to worry about TLP anymore, its passive. PowerTop is more for diagnosis.


 No.899825

>>899772

>Drivers aren't really important in power outside of the GPU maybe.

Wrong.

>CPU doesn't need em

Not "drivers" per se but most CPUs use different techniques for power saving, and Intel's not very consistent with sticking to its own plan anyway. The kernel needs work for every new generation of CPU whatever the architecture.

>and most WiFi cards use common drivers

Many of which have crappy power management, which you'd know if you're a Linux user. It's practically a meme at this point that you need to be extra careful when selecting wireless cards, especially if you want good power management.

>not that the drivers do much. Hard to write a power-inefficient driver.

OK I fell for bait.


 No.899873

But linux is already deprecated by Azure Sphere


 No.900168

>>899772

I bought one of these and i can't tell the difference in battery life on my t500

https://www.trendtechcn.com/Product.aspx?ProductId=325


 No.900176

Sounds good, wonder how much of an impact it really will have.

>>899680

GNU/Linux always lasted around 30 minutes longer for me on my current laptop than Windows did.




File: ef1a004990c540f⋯.png (29.51 KB, 3360x320, 21:2, los.png)

 No.893394[Reply]

https://lineageos.org/Changelog-17/

tl;dr builds between 1st april and 8th april have a prank which tells the user that their device is compromised and will be used to mine crypto and it's impossible to completely shut this notification off without using root shell

https://www.reddit.com/r/LineageOS/comments/89f76y/can_we_have_a_serious_talk_about_april_fools/?sort=top

Do you think it's still a good idea to install LineageOS on your mom's phone?

Too bad Replicant and Copperhead support only 1.5 devices. What do?

64 posts and 8 image replies omitted. Click reply to view.

 No.899737

>muh privacy

>muh open source

>it does not matter whether if my phone has an entire operating system running at ring -3 and has full i/o access

>not to mention it can be operated remotely by you-know-who

Fuck off. Retarded niggers deserve retarded jokes. Kill yourself.


 No.899932

>>893401

>Trusting a Chinese OS.

You're going to get Mao'd.


 No.900030

>>899661

>pretty sure it loads in the background while the message is showing

it's usually not that way on phones, and he's probably actually wasting time and power


 No.900095

>>893507

How do you turn on pirate locale? I can't find it in the language selector.


 No.900119

>>900030

I checked, you can remove to message

but it wont affect boot time

you still get the manufacturer logo splash




File: d5258f9b2c74654⋯.jpeg (219.86 KB, 2000x2000, 1:1, images.duckduckgo.com.jpeg)

 No.885825[Reply]

Discussion regarding the all-mighty flip phones

>still wasting your hard earned money on a screen that's still too small enough for media consumption

>does what phones are supposed to do

>doesn't fucking die when you drop it

28 posts and 7 image replies omitted. Click reply to view.

 No.899940

>>896556

>RF radiation of these is thousands of times stronger than botnet phones.

Post Proofs.


 No.900048

>>896556

>RF radiation of these is thousands of times stronger than botnet phones.

So? Are you one of those ignorant retard who think "radiation = nuclear = bad"?


 No.900069

Put your hand inside a microwave and see what happens.


 No.900070

>>900069

Surely it isn't silly at all to compare 700W of radiation in an enclosed space to 100mW of radiation in an open space.


 No.900078

File: 154f72dff42737c⋯.png (65.07 KB, 1134x1333, 1134:1333, radiation.png)

>>896556

>>900069

>eat a banana

>get cancer and die




File: 5e17d427db2b571⋯.png (92.84 KB, 319x334, 319:334, 83f6988f3ae55c0e4e8cda0830….png)

File: acd10a197cb4c03⋯.png (116.36 KB, 319x450, 319:450, 410c840722ebe7744043fe5773….png)

 No.899573[Reply]

Katsuhiro Harada Producer of Tekken Says Denuvo Affects Performance

https://archive.fo/DcrjK

13 posts omitted. Click reply to view.

 No.899781


 No.899954

Look at the sorry state of this thread. Slid by some niggers.

Point is DRM hurts performance and gaymers should get all huffy about it. Of course, deciding to forgo DRM-laden software is not an option because muh gaymes n shit so let the angry forum posts commence!

If this Jap was really mad he'd release his gaymes DRM-free on GNU/Linux and open source at the bare minimum the previous versions. Instead he will shrug his shoulders after complaining a bit, then go back to cranking out proprietary Windows software and allow his publisher to infect it with a DRM virus and then inflict this indignity on his brain-dead fans.


 No.899955

Hi /v/!


 No.899961

A virtual machine designed to run absurdly large obfuscated code that deliberately does useless things that have no actual purpose to make reverse-engineering hard affects performance?

No shit.


 No.900029

>>899650

>Digital Restrictions Management

This is the correct name. Don't make this mistake again ffs.

>There are hardware means to try and prevent people from copying, but they aren't DRM.

What else they are then?

…what a bunch of bullshit, fuck.




File: a6de6db1ecae76b⋯.png (1.19 MB, 3840x2160, 16:9, programming_challenges_v4.….png)

 No.863611[Reply]

BI-YEARLY PROGRAMMING THREAD

Working on code? Post it here!

Not working on code? Open your sh-compatible shell and type `echo $(( ( RANDOM % 145 ) + 1 ))` to choose a challenge. If you have any more of these programming challenges images, please do share.

NO BLOAT

NO OBSFUCATION

NO GAY SHIT

127 posts and 11 image replies omitted. Click reply to view.

 No.899282

How hard is it to get a remote programming job? Am I going to have to do web development if I want this? I just want a job that will let me travel (on my own, not as a job requirement).

I already had a hard enough time and gave up on trying to get a regular programming job after graduating with a 2 year degree, but then again I live in the middle of fucking nowhere so there's like 10 jobs available and all are senior positions.


 No.899289

>>899282

Also is freelancing really even viable? I've looked into freelancing before and it honestly just always looked like it's not worth bothering with.


 No.899325

>>899282

It's not easy, even if you already have a programming job. It obviously depends on the company but I think most people who program remotely usually start out on site. Or nepotism.


 No.899329

>>899325

How common would it be for employers to let you work from home for like a few weeks at a time in an otherwise office job?


 No.899982

>>863611

>Working on code? Post it here!

I wrote a library in C to work with some proprietary file formats of Devil May Cry 1.

https://git.teknik.io/scuti/lib3ddevil1




File: dd9e5240f26051c⋯.jpg (52.8 KB, 600x600, 1:1, FA4529XIMDZATMV.LARGE.jpg)

File: 2c4a3884954abd0⋯.png (52.26 KB, 500x299, 500:299, atmega-328-pins.png)

File: d842e3b320a1fae⋯.jpg (14.89 KB, 220x237, 220:237, 220px-Fpga_xilinx_spartan.jpg)

 No.898287[Reply]

Hey, anon! Have you taken the chip pill? If you are a real computer enthusiast, you care about working shit at the hardware level, right?

https://www.sparkfun.com/tutorials/93 - getting started with an ATMega328, the basis for the Arduino

http://referencedesigner.com/tutorials/verilog/verilog_01.php Verilog tutorial for FPGA

https://docs.google.com/file/d/0B5jcnBPSPWQyaTU1OW5NbVJQNW8/

Getting Started in Electronics

Whatcha buildin', anon? Whatcha want to build?

37 posts and 10 image replies omitted. Click reply to view.

 No.899471

>>899437

USBasp's are pretty nice and cheap programmers for the AVR.

if you want to program over serial then you have to flash a bootloader (ex. the Arduino one) onto the atmega and then use some USART module to send your code.


 No.899480

File: 0b80251dcb5aa1d⋯.png (110.84 KB, 602x330, 301:165, BRAINFUUUUCKED.png)

>>898287

I want to build a mobile Brainfuck interpreter in a small gameboy-like case.

Little screen, 14 small buttons (4 directions, 8 commands, 1 enter, 1 save/run).

Me thinks a small Pi Zero (or C.H.I.P, when they actually ship in a month or two), any recommendations on building/buying a semi-decent/solid project cases?


 No.899487

>>898624

>>899090

Thanks for posting the pdf. I've always been a brainlet when it comes to electronics and circuitry and I've always wanted to do cool diy shit with the stuff.


 No.899584

>>899480

>Pi Zero

>CHIP

You will have more "street cred" if you do it yourself tbh.

Literally less than 10$ project and couple of hours of fucking around.

Go on ebay and look out for "microcontroller", "dip sockets", "eeprom", "prototyping board", "USB to TTL" (to program the microcontroller and add memory to eeprom", "lcd module", "lithium ion protection circuit", "18650 battery", "18650 battery holder", couple of switches, connectors, buttons...


 No.899964

File: 2cea1e79e6b53d5⋯.png (75.48 KB, 6814x1202, 3407:601, first.png)

>>898962

You were absolutely right my friend, I have finally recorded the signal

Now I just have to program an ESP8266 to reapeat the signal, or maybe analyse it for kicks




File: 539d21238bf93cb⋯.jpg (282.35 KB, 1600x1600, 1:1, changes.jpg)

 No.898217[Reply]

It seems quite clear that GNU/Linux is changing into something radically different from how it's been for the past decade or so. Truly radical changes are coming.

>Networking

I'm sure a lot of you are GNU/Linux users. How do you show information about your network interfaces? How do you print your routing table? How do you view the arp cache?

Your answers are probably ifconfig, route, and arp. However, these commands we've always known are being depreciated in favor of ones from the iproute2 suite, so in the future you will be typing ip addr, ip route, and ip neigh for those respective functions.

https://en.wikipedia.org/wiki/Iproute2

>GUIs

For decades, UNIX and Linux systems have used the X windows system. This is going to, in time, be replaced by Wayland. It's currently too early for a full switchover, but with both the GNOME and KDE projects, plus Debian and Fedora supporting it, it looks like it'll happen sooner than we thought. It's a huge change, and with it completely eliminating screen tearing and having much better security, I think it will be a positive one.

>Firewalls

Speaking of security, I'm sure you're all familiar with iptables. Well say goodbye to that, because it's being replaced by nftables. This aims to be better by being more minimal, or rather just putting a lot of the code in userland rather than kernelspace. Also better syntax.

https://netfilter.org/projects/nftables/

>Application distribution

For the longest time, GNU/Linux users got their software from distro repositories. Despite many users claiming this is the best way to do things, it has had some criticisms. Therefore, there have been a few projects hoping to solve the issues and make the process of getting software more friendly to users of mainstream OSes.

Post too long. Click here to view the full text.

232 posts and 29 image replies omitted. Click reply to view.

 No.899713

>>899708

>There's nothing wrong with this

That's just like your opinion man.


 No.899918

>>899708

>>899686

Enjoy your ridiculously unstable software, retards.


 No.899922

>>899918

I will enjoy my perfectly stable API. My software ABI is stable because the programming experts make it stable 😁 😁


 No.899948

>>899918

Funny. The software I install are completely stable.


 No.899951

>>899691

I bet it works real well when I plug in a USB microphone and want to use it on a firefox chat program.




File: 8f987e5a0f95b35⋯.png (110.98 KB, 411x468, 137:156, xpsp3.png)

 No.898165[Reply]

Seems only like yesterday.

36 posts and 8 image replies omitted. Click reply to view.

 No.899690

>>899524

>UNIX-based OSes are so irritating to use.

So use Linux.


 No.899818

>>899688

>did nothing but remove features

Please do go on and elaborate, thanks. What features did it remove?


 No.899869

>>899666

Supposedly low-end cards in the 900 series have XP drivers. I haven't bothered to check though.


 No.899881

>>899524

>8.1 mainstream support ended this January (leaving 10 the only Windows in mainstream support)

>XP PoSready EOL (aka ultimate and final death of XP) January 2019

>7 EOL January 2020

>8.1 EOL January 2023 (leaving 10 as the only supported client Windows OS)

>by then Windows Server likely discontinued and subsumed into an Azure IaaS model, same with standalone Office discontinued, only Office 365 SaaS left

How fucked are Microsoft users at this point?


 No.899909

my real problem with nvidia drivers is that they removed TV-OUT Support in XP and 7

fucking crt tv never works under windows with lastest supported drivers. the main reason I still have some older cards.

fuck htpc and video drm.




File: df444f9a6c836c8⋯.jpg (93.69 KB, 1200x670, 120:67, OpenPrinter.jpg)

 No.899760[Reply]

Why are there no ongoing open printer projects?

There was like one guy in 2011 who was basically building a carriage around proprietary printer heads, but other than him I can't find anything.

3 posts omitted. Click reply to view.

 No.899804

Are there any good tools for using a 3D printer for page printing?


 No.899808

>>899778

Lulzbot printers are stallman-approved


 No.899821

>>899804

>Are there any good tools for using a 3D printer for page printing?

I warn you but 3d printer for paper printing is not a viable solution if you want to understand why please read:

ISBN: 0-9720159-3-0

>>899808

Thanks I'm aware of that.


 No.899826

>>899821

>ISBN: 0-9720159-3-0

Thanks for the tip


 No.899828

>>899826

You're welcome have fun reading it.




File: acdf8306910362d⋯.png (3.18 KB, 320x226, 160:113, 320px-Haskell-Logo.svg.png)

 No.897963[Reply]

Daily reminder that Haskell is a shitty language.

12 posts and 2 image replies omitted. Click reply to view.

 No.898227

>>897966

But what about Plankalkül?


 No.898251

>>897963

Functional programming is the idealistic form of computer logic, though. Look at lambda calculus.


 No.899775

Haskell will be a lot better once it gets dependent types.


 No.899787

>>899775

Have you ever actually used dependent types? Idris is Haskell with dependent types. They are a real PITA.


 No.899894

>>898141

>dat pic

WTF, now I love faceberg and will upload all my data to them!




 No.897820[Reply]

ITT: We critique each others fizzbuzzes


#include <stdint.h>
#include <stdio.h>


#ifdef __GNUC__
#define HOT_INLINED __attribute__ ((always_inline)) inline \
__attribute__ ((hot))
#else
#define HOT_INLINED inline
#endif


static const char *LOOKUP_TABLE[] = {
"FIZZBUZZ", NULL, NULL, "FIZZ", NULL,
"BUZZ", "FIZZ", NULL, NULL, "FIZZ",
"BUZZ", NULL, "FIZZ", NULL, NULL
};


typedef struct s_div10_t
{
const uint32_t quot;
const uint32_t rem;
}
div10_t;


static HOT_INLINED div10_t div10(uint32_t value)
{
uint32_t quot = (value >> 1) + (value >> 2);

quot = quot + (quot >> 4);
quot = quot + (quot >> 8);
quot = quot + (quot >> 16);

quot = quot >> 3;

uint32_t rem = value - ((quot << 3) + (quot << 1));

quot = quot + ((rem + 6) >> 4);

if (9 < rem) rem = rem - 10;

return (div10_t) { .quot = quot, .rem = rem };
}


static HOT_INLINED uint32_t mod15(uint32_t value)
{
value = (value >> 16) + (value & 0xFFFF);
value = (value >> 8) + (value & 0xFF);
value = (value >> 4) + (value & 0xF);

if (value < 15) return value;
if (value < 30) return value - 15;
if (value < 45) return value - 30;

return value - 45;
}


static HOT_INLINED void printu(uint32_t value)
{
if (0 == value)
{
putchar_unlocked('0');
putchar_unlocked('\n');
}
else
{
char buffer[11] = { 0 };

char *iter = &buffer[9];

buffer[10] = '\n';

while (value)
Post too long. Click here to view the full text.
37 posts and 6 image replies omitted. Click reply to view.

 No.899697

>>898662

>main [-1u]= { 1 };

Care to explain this bit? It really confuses me.


 No.899727

File: 5e7a772b91ae7e9⋯.png (37.48 KB, 661x421, 661:421, Screenshot at 2018-04-12 2….png)

>>899697

The suffix "u" makes the compiler read the integer as an unsigned integer. Because it is almost guaranteed that the computer uses two-complement to represent integers, signed -1 is equivalent to the maximum permitted unsigned integer, i.e. 1111 1111 1111 1111...

So, he's creating an array of UINT_MAX which contains the number 1 everywhere.


 No.899728

File: ed11b0a24424cec⋯.png (25.68 KB, 661x421, 661:421, Screenshot at 2018-04-17 2….png)

>>899727

Uhm that's not the screencap I wanted to post.


 No.899730

>>899697

>>899727

Now, that's not the real trick he's doing. By creating an array called main, he tricks the linker into thinking the contained data is in fact the main() function. I saw this hack implemented by simply declaring a const char array that contained the bytes of a classic "hello, world!" program. Because they were declared as const, they were also executable (since memory cells are either writable or executable in modern computers). That way, it was effectively possible to write a C program without ever declaring a main() function.

Why it would work without declaring the type of the array, or the array as constant I do not know.


 No.899747

File: a9b261a8a1924d9⋯.png (9.52 KB, 881x126, 881:126, Screenshot at 2018-04-17 2….png)

FizzBuzz hardware edition:

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity fizzbuzz is
port (clk : in std_logic; fizz, buzz : out std_logic);
end fizzbuzz;

architecture behaviour of fizzbuzz is
signal cnt : unsigned(6 downto 0) := "0000001";
signal cnt3, cnt5 : unsigned(2 downto 0) := "001";
begin
p1: process(clk)
begin
if rising_edge(clk) then
cnt <= cnt + 1;
cnt3 <= cnt3 + 1;
cnt5 <= cnt5 + 1;

if cnt3 = "011" then cnt3 <= "001"; end if;
if cnt5 = "101" then cnt5 <= "001"; end if;
end if;
end process;

fizz <= '1' when cnt3 = "011" else '0';
buzz <= '1' when cnt5 = "101" else '0';
end behaviour;




Delete Post [ ]
[]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]
| Catalog | Nerve Center | Cancer
[ / / / / / / / / / / / / / ] [ dir / animu / cafechan / femdom / hisrol / leftpol / sg / tacos / vg ]