[ / / / / / / / / / / / / / ] [ dir / egy / firechan / fukemo / fur / kemono / occult / sonyeon / strek ]

/tech/ - Technology


Winner of the 7th Attention-Hungry Games
/pyong/ - The little red fox you never thought youd see again

Server upgrade almost done. Tweaking kernel and making micro-adjustments to improve site performance. If you find any problems, please report them to /sudo/. Thanks.
Comment *
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Show oekaki applet
(replaces files and can be used instead)
Password (For file and post deletion.)

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

File: 1462739442146.png (291.84 KB, 450x399, 150:133, RMS.png)


Welcome to /tech/ - ∞chan's technology board.

Please check the rules before you post:


Looking for hardware or software recommendations? Check out the InstallGentoo Wiki:


/tech/ is for the discussion of technology and related topics.

/tech/ is NOT your personal tech support team or personal consumer review site. We have stickies for that. Keep those kinds of posts in there.

For tech support, software recommendations, and other questions that don't warrant their own thread, please use the '/tech/ Questions and Support' sticky.

For consumer advice, please use the consumer advice sticky located below.

For meta discussion, please go to >>>/metatech/.

For desktop threads, homescreen threads and ricing, please go to >>>/rice/.

For tech support/issues with computers:

https://startpage.com/ or https://ixquick.com (i.e., fucking Google it)



If you can't find what you're looking for and still need help, post in the tech questions sticky.

Looking to switch over to GNU/Linux? Don't know where to start?

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

Post last edited at


>>>/agdg/ - Amateur Game Development General

>>>/biz/ - Business and Finance (and cryptocurrencies)

>>>/cyber/ - Cyberpunk & Science Fiction

>>>/emacs/ - GNU Emacs

>>>/sci/ - Science and Mathematics

>>>/electronics/ - Electronics Engineering

>>>/laboratory/ - STEM Discussion and STEM Shitposting

>>>/hamradio/ - Amateur Radio

>>>/lv/ - Libre Video Games

>>>/make/ - Make stuff

>>>/netplus/ - Networks and Plus

>>>/prog/ - Programming

>>>/rice/ - Desktop and Phone Ricing

>>>/t/ - Torrents & Trackers

>>>/templeos/ - The 64-Bit Temple Operating System

>>>/vape/ - Vaporizers

>>>/vir/ - Virtual Reality

>>>/wg/ - Wallpapers General

Post last edited at

File: 53eac902e05dd53⋯.png (2.82 KB, 200x200, 1:1, questionmark.png)


Bring all your hardware, software and other troubles here.

399 posts and 72 image replies omitted. Click reply to view.



The method is different for each phone, if it even exists. The best thing to do is search online to make sure a root method, a custom recovery like TWRP, and a custom ROM like LineageOS exist, *before* you buy the phone. They should be downloaded, ready, and waiting when you bring the phone home. It can also be different for each variant of the same model, e.g. the T-Mobile version might be rootable while the AT&T version might not be. Also be wary of fake sites that pretend to supple a root method when they actually just install a trojan. Imo, you should also only buy a phone with a removable battery and removable sdcard, and no more than $300. Do phones like that even exist? Yes. But not many. You have to do some homework online.

File: 9cd31551fedf586⋯.png (4.65 KB, 200x200, 1:1, dollarsign.png)


Looking to buy something but aren't sure what to get? Ask here.

399 posts and 98 image replies omitted. Click reply to view.



>Beyer DT 770s

>no removable cable

File: 75c061e222d8b2e⋯.jpg (82.52 KB, 850x638, 425:319, 1450614069094.jpg)


The Rust home page makes it sound like Rust is some sort of a panacea. It leads one to believe that they'll get the power of C++, but with greater "safety".

But the more I look into Rust, the more uneasy I start to feel.

Despite all of the claims about how Rust is safer and leads to better code, the Rust compiler and standard library, both of which are implemented in Rust, are full of bugs [github.com]! Don't forget that this is Rust code written by people who ought to know Rust better than anyone else; they designed the language after all! If they can't write non-buggy Rust code, then we shouldn't expect less-talented Rust users to be able to do any better.

It's also a big problem that there's only one implementation. If you run into a bug with it, and they don't fix it promptly, then you're likely fucked. At least with C++ there are multiple high quality implementations from different vendors. You can use GCC and Clang on most platforms. Then there are other systems like Intel C++, MSVC++, and so forth. You aren't left at the mercy of a single implementation when you use C++.

The syntax of Rust is unremarkable. It's like a bad version of C++ in many ways. Its resource management approach is also inflexible and impractical, despite the claims that it's one of Rust's most significant benefits. You're typically better off using modern C++ techniques. You'll get just about the same amount of safety, but with much fewer headaches. Even C++'s standard library, which is not known for being very good, is often better than Rust's.

It took them forever to get Rust 1.0 released. They were constantly changing their mind about anything and everything. While some evolution of a programming language is to be expected, all we saw from them was spastic thrashing about. It got so bad that you couldn't write code on a Monday and reliably have it compile by the following Friday! The fact that it took libcore up until release 1.6 to "stabilize" just goes to show how bad things were. The supposed "stable" release was full of non-stable interfaces!

Post too long. Click here to view the full text.
53 posts and 3 image replies omitted. Click reply to view.



>more non-arguments

Just go back to reddit already


Thats mostly my only gripe with Rust, fucking reliability.

It would be helpful to establish something that will always be "safe reliability" set of Rust.



I've yet to hear at least one argument from your side. Only saw horse shit so far.



Except you never made an argument.

>any language is better than this crap

Great argument



>Except you never made an argument.


File: 60966e41170f028⋯.jpg (723.3 KB, 1436x1400, 359:350, doom halation.jpg)


In the early 00's, when I first started going online (before all I knew were DOS and BBS), whenever I'd see a website end in .html I thought that meant "dot Hotmail" because I thought Microsoft controlled all the Internet.

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


When I first got into editing and then creating models for Half-Life mods, I thought .smd stood for "suck my dick" instead of "studio model data".


I thought lol meant lots of love. It didn't go down well in a text when my friends dad died.


File: 85750959a4b141c⋯.jpg (9.48 KB, 240x193, 240:193, SmartHelper.jpg)


I thought all video games had a 'core' you could see behind one of the walls if you could get your camera to clip beyond a wall.





I thought windows was good

I know better now

File: 65d99633b0f6dfc⋯.png (21.1 KB, 923x324, 923:324, keyb-stat.png)


Hey guys,

Ive recently been getting more into linux setups using tiling window managers (using i3 on one of my t420's rn) and programs like uzbl-browser, vim-likes, etc. The problem i'm running into is that I use Dvorak, so when I started using programs like these and my whole window manager configuration in general, all the hotkeys are messed up, programs that are supposed to be intuitive are the opposite, and it's really slowed my transition into tiling window managers and keyboard-intensive programs like the ones I listed above.

So my question is this, to you fellow alternative-keyboard-users, how do you solve this problem? Is there any other way to do it, besides going through the configuration files for each and every program and changing the keymappings manually? I'm hoping there's someone on here whos been through this and can give me some pointers.

Thanks in advance. I'll be monitoring the thread as long as its up, so if you know anything about this at all, PLEASE let me know.

1 post omitted. Click reply to view.



i have googled it myself, but i was just seeing if anyone had any advice other than "google it" cause that does not solve this problem entirely.


I've been using Dvorak as my primary layout for about 10 years now. I've honestly never had problems, but I don't use my mouse much at all. Most hotkeys focus around left-hand use, and it's true that Dvorak doesn't work well for that. I've never had an issue because I use Awesome with both hands on the keyboard at all times. I only reach over to the mouse very rarely (usually to my web browser for a website that is not keyboard-friendly). I'm also a Vim user, so I don't have to use my mouse for my text editor ever (you'll be as fast as any QWERTY user with Vim when you get used to it. It's not like arrow keys, you do it all by muscle memory anyway).

I really would not recommend changing your keyboard mappings. Get used to them the way they're "supposed" to be, because tons of programs won't let you change the mappings, and because it's too much pain to change all of them. Really, you have 4 options:

1. Get used to making your mouse a second-class citizen. Keep both hands on the keyboard as much as possible, and only use the mouse when the keyboard is not possible or when the mouse happens to be far more convenient. This will make your hotkey issue nonexistant, as you can then use both hands to hit whatever key combination you need.

2. Use the mouse heavily, but get used to moving your hand back to your keyboard often. When you do this a lot, it'll become more natural and convenient, and you won't have to find your place. I avoid this, but I've gotten comfortable enough to move my hand between the mouse and its correct place on the keyboard without looking and without any slowdown.

3. Use the mouse heavily, and get used to reaching with your left hand. Use pinky on mod keys and thumb to hit the hotkey. You can train this, but it will be clumsy for a while until you build the muscle memory. Alternately, you can get used to jumping your left hand to the right side of the keyboard, to hit the right mod keys with the thumb and your other fingers to hit the keys.

4. Switch keyboard layout. You could change back to QWERTY, or you can use a hotkey-friendly layout like Colemak.

I essentially use 1, 2, and 3, depending on the application. For video games Post too long. Click here to view the full text.


Frgp lroy mae. m. ydcbt ru orm.ydcbi ugbS <. odrgne ann yfl. cb a Ekrpat[rb[',.pyf jfld.p or yday brpmanuaio jab-y gbe.poyabe gov

F.ow C tbr, cy-o a odcyyf ce.as C-m hgoy dakcbi ugbv


I mapped M-x to M-t in emacs, feels much more fluid. I also map copy/paste to their respective quarty layout, for when i need to use a mouse.

Other then that my hotkeys work just fine. The only time I switch to quarty is a few muh gaymes


>fellow alternative-keyboard-users, how do you solve this problem?

I solved it by switching to the standard en-US layout.


How safe is


DDG is alright but /tech/ told me it's shit and localized german search suggestions of startpage.com are shit

15 posts and 1 image reply omitted. Click reply to view.



Is the search language set to the same in both those screenshots? And the date?

They're not very convincing.


File: ed9a2d84aca9bb6⋯.jpg (39.39 KB, 502x335, 502:335, bestgoy.jpg)


>what is

block quick to { <jewgle> <fecesbook> }



>I can't read english goy

>I can't see the pictures and where it was edited into one photo goy

I think it is the same date because of the way it was edited for the window borders. You can see where the window manager overlapped things and where it was combined as multiple photos for the same image.



(level of unnecessary paranoia) = (technical ignorance) * (general stupidity)

This crap is getting out of hand. There are more than enough real things to be wary of without going full retard. Get a grip. Stop listening to Agent Fud and get a basic knowledge of best practices for security and privacy. Otherwise you might as well just dig a hole and stay in it.

File: 6f2d936ebc75683⋯.jpg (64.05 KB, 900x900, 1:1, Photo.jpg)

File: 43c6a6ee874d46b⋯.jpg (87.39 KB, 600x460, 30:23, ShakeMoney-600x460.jpg)

File: caa8a2b7a12a1ae⋯.jpg (61.09 KB, 500x333, 500:333, Photo-2.jpg)


By Brian Fagioli

There have been rumors for a while now that Google was going to buy the struggling HTC. This seemed like a wonderful idea, as HTC makes great smartphones, which is good for the overall health of the Android market.

Today, a deal finally happens, but Google didn't buy HTC outright. Strangely, as the deal is laid out, the search giant has seemingly bought HTC employees. Yes, for $1.1 billion, the search giant has sort of purchased human beings -- plus it gets access to some intellectual property. HTC gets a much-needed big influx of cash.

"Google and HTC Corporation today announced a definitive agreement under which certain HTC employees – many of whom are already working with Google to develop Pixel smartphones – will join Google. HTC will receive $1.1 billion in cash from Google as part of the transaction. Separately, Google will receive a non-exclusive license for HTC intellectual property (IP). The agreement is a testament to the decade-long strategic relationship between HTC and Google around the development of premium smartphones," says HTC.

The company further explains, "This agreement also supports HTC's continued branded smartphone strategy, enabling a more streamlined product portfolio, greater operational efficiency and financial flexibility. HTC will continue to have best-in-class engineering talent, which is currently working on the next flagship phone, following the successful launch of the HTC U11 earlier this year. HTC will also continue to build the virtual reality ecosystem to grow its VIVE business, while investing in other next-generation technologies, including the Internet of Things, augmented reality and artificial intelligence."

In other words, HTC remains its own entity -- Google does not own it. Tomorrow morning, some HTC employees could be informed that they will eventually be sold to Google -- almost like when a professional sports player is traded to a different team. Yeah, it seems rather weird, but it looks like both companies are getting what they want/need.

Rick Osterloh, Senior Vice President ofPost too long. Click here to view the full text.

3 posts and 1 image reply omitted. Click reply to view.


fuck off


File: 50eec48fcab3ee3⋯.png (27.04 KB, 300x100, 3:1, australia.png)



It will sure get you a lot of them though.



fuck off cia nigger


File: 83192d7c8788378⋯.png (527.87 KB, 640x480, 4:3, 1468606858281.png)

>becomes so mired in sjw cultism and Cultural Marxism that engineers don't want to touch you with a 50 foot pole

>pay out the ass to buy this type of talent instead


File: f55691ca3af3450⋯.jpg (61.28 KB, 530x750, 53:75, yuraofthehair.jpg)


Why are you not coding in Fortran, /tech/?

Straight From Wikipedia:

>Fortran (formerly FORTRAN, derived from "Formula Translation") is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing. Originally developed by IBM in the 1950s for scientific and engineering applications, Fortran came to dominate this area of programming early on and has been in continuous use for over half a century in computationally intensive areas such as numerical weather prediction, finite element analysis, computational fluid dynamics, computational physics, crystallography and computational chemistry. It is a popular language for high-performance computing and is used for programs that benchmark and rank the world's fastest supercomputers.

I'm not going to blow smoke up your ass, and tell you it's perfect, but when it comes to number crunching, Fortran is the man.

>But anon, I use scipy and numpy when I need to crunch numbers. They are really useful and work well.

<Those are just Fortran and C kernels wrapped up in slow ass python.

Numpy arrays are just Fortran coarrays. If you had just written your program in Fortran, you'd be cutting out the middle man, and your code would be much much faster. Fortran is close to the machine, similar to C, only C is made for systems programming, while Fortran was made for math dince day one.

Speaking of day one, Fortran was the first high level compiled language. It was created by John Backus, the guy that created SpeedCode, the first high level language. It was interpreted, and a lot slower than assembly, but it was much much easier to program in.

>But anon, why don't I just use MATlab or GNU Octave?

<That's a step up from python, but those are just interpreted imitations of Fortran. Besides, Octave is buggy. It crashes harder than 9/11, and MATlab is proprietary.

Octave is a superset of MATlab, and MATlab is just a proprietary scripting language based on Fortran aPost too long. Click here to view the full text.


RMS doesn't like it and neither do I.


Which version are we supposed to look at? It looks like there's a lot of different implementations.

Also which compiler?




<It's best for images

>implying anything is better than the G


Ah, a quality thread, as I love them.

Yes, OP, I agree that Fortran is a superior language, however, to truly see the light, you need to stick to Fortran 77, which enforces good coding practices by design. Any posterior Fortran standard is bloated shit.



well, why aren't you????????

fuck off larper

saged & reported

File: 81180549f0636de⋯.jpg (764.48 KB, 2576x1936, 161:121, 20170707_001.jpg)


Scored the LaPo and it's autosaging, making a new one.

Reminder: With ThinkPads or Toughbooks, the ride never ends.

>yfw your T22 has the BoD problem but it's so random most of the time it just works fine

218 posts and 24 image replies omitted. Click reply to view.



I went with the p50.

Compare reviews between p50/p51 and see if any stick out as significant.

ALSO these machines come with different processors/screens/ssd/etc so make sure you know what you're getting. Xeon is nice but I never really compared it to anything else.

According to cpubenchmarks assuming you got Intel® Core™ i7 processor i7-2620M with dual-core (best processor that came with T420) it scored 3,832. My P50 came with Intel Xeon E3-1505M v5 @ 2.80GHz and scores 8,949.

Maybe that difference is all you need? But again make sure you know which processor that you are planning to order comes with the laptop if you're looking for some specific increase in performance.

And while the score from this xeon processor sounds high, it is actually somewhat low on the high end cpu list (which doesn't mean it is bad). Refer to this: https://www.cpubenchmark.net/high_end_cpus.html

Also consider the GPU which can be important too. I hope that helps.. Take some time getting to know all the parts!..



P-series are actually hilariously bad cooling wise, according to NBR.

Getting my CF-31 battery tomorrow hopefully, and at last I got my USB > PCI adapter in the mail earlier today. Sitll haven't tried HDTune on a USB stick though.


My Thinkpad has the keyboard's letters a bit yellowish. Can I do anything to improve its aesthetics?


Fuck, i'm not getting my CF-31 battery today.

Question though: I bought "The Windows NT Technical Support Training Kit" earlier today and I can't seem to install it on my T23, any reason why?



I have a T470, it's great.

File: 5d7e7cc606aac8d⋯.png (45.91 KB, 971x599, 971:599, 1.9Logo.png)


LynxChan is a chan engine I started developing over two years ago, with the goal to be the best engine you would ever shitpost with.

It aims to offer great performance, customization and flexibility.

1.9 is about to enter beta and introduces a very important feature: JIT caching.

JIT caching is caching pages once they are requested, instead of caching when their content is changed.

This feature should allow for not only a significant reduced CPU usage but also for a more responsive experience for users.

Other from that, this version will also add a few features:

File search on media management

Maintenance images

Ability to restart the unix socket from a GUI

Subject editing

Board locking

Better global board moderation

SSL can be made mandatory

Mass bans directly from ips

I have a small instance running it over http://lynxhub.com and a list of chans running it can be found at http://lynxhub.com/lynxchan/res/285.html

14 posts omitted. Click reply to view.



Catalog, previews and board pages.



Mind you, this also help immensely when a full site rebuild, since you just drop all caches.


wew lad


What's better for a single-board chan? This, or vichan? I only need webms and images.

Is LynxChan tested on OpenBSD? Because setting up vichan on obsd is a pain in the ass



>What's better for a single-board chan? This, or vichan? I only need webms and images.

This. Its easier to install, customize and maintain. Also is configurable to make it having a single board won't feel awkward.

>Is LynxChan tested on OpenBSD?


File: e8732382f759dde⋯.png (132.57 KB, 1400x1050, 4:3, 2017-05-25-144021_1400x105….png)


24MB ram edition

Nice bloat, faggot.

284 posts and 54 image replies omitted. Click reply to view.




Ofast CAN go really fast (in heavy FP calculations).



>another Slackfag

It is so good to see you, brother.




>using scrot



Which profile should I use for i3wm?

The default one or the desktop profile?

File: e6f9089cd801b5d⋯.png (177.28 KB, 944x903, 944:903, smugchan.png)


There's been some talk for a while now about the idea of putting together a properly distributed imageboard, and there have been some efforts made towards that end. However, in my view the current efforts still have a number of weak points that leave them vulnerable to targeted attacks knocking them offline. NNTPchan for instance is cool, but the way it's put together DDoSing a (relatively) small number of nodes is still sufficient to take the federation down.

For the past year now I have been slowly working on an IPFS-based federated imageboard software package. It's still in a very early state, and I was hoping to let it sit until IPFS developed a little more, but recent events have made it clear that the noose is already starting to tighten now so out the door it goes.

Github: https://github.com/smugdev/smugboard

Working instance: http://localhost:8080/ipns/client.smugchan.org/#Qmf9QKURJVU53mzmysAFAR3mj48dLXqS2rNpq2o41EugcV/tech

(You need a running go-ipfs daemon set up as per https://github.com/smugdev/smugboard#usage to actually access it)

This is Smugboard, an imageboard package with a fully distributed content layer and a maximally decentralized control layer. It is composed of 5 separate server packages handling different aspects of posting and moderation, and a client-side renderer. Each thread and board takes the form of an append-only log hosted via IPFS, with moderation taking the form of a client-side filter. Users can choose to toggle specific mods on or off (soon - UI not yet complete).

As noted the federation is composed of a series of append-only logs, and these are published directly within IPFS. A proper UI for this isn't done yet, but it will be possible to fork any board or thread from its current state, or from any previous state, at any time. In the event of a board goiPost too long. Click here to view the full text.

197 posts and 17 image replies omitted. Click reply to view.



I wouldn't say it fixes everything; you still have to motivate people to moderate at all. With no incentive to be a power tripping mod, you remove the autistic dedication to moderate 24/7.

This is a respectable first step, however. Ideally you'd be able to combine them in a manner similar to adblock lists. You subscribe to people who promise a certain level or mode of moderation and combine them to reach comprehensive coverage of posts.


Looks pretty alive to me, especially considering Jap Mastodon doesn't block the Fediverse. This is the exact opposite of what those Mastodon servers did; instead of letting users block content on a case-by-case basis, the admins blocked entire nodes of the network.


File: a03a22f5e0af836⋯.webm (3.26 MB, 640x480, 4:3, Freakazoid - Fan Boy.webm)


>With no incentive to be a power tripping mod, you remove the autistic dedication to moderate 24/7.

That's always been my main problem with choosing people for this position. I was always on the administrator level and needed folks to moderate for me after a certain point so I could focus on other things. It has been the same issue since the BBS days: no matter who I picked they'd eventually let their ego get in the way of their job. It'd go to their head and the community would rightfully want them ousted. In 20 years I only found a few people, out of hundreds, that could handle it without becoming a major problem for me. Even those folks would often have minor slips of not remaining impartial. I never understood why my simple instructions could never be followed: don't let them post pizza or anything that will bring me legal trouble and if they fight let 'em.

I like this model for the reasons you states, any power tripping/stupidity can just simply be ignored by not subscribing to that list. However, I do agree that SJWs will hug box themselves as they always do and this type of set-up may prevent important information from reaching the masses via self-censorship. At least with this model I have a choice in what I read.



god that is just the fucking problem isn't it


How are the mod filters implemented? Do users have to download the whole linked list of posts first and then the client filters them out of the UI or does it process the filter list first and prevent blocked posts from being downloaded? This is a pretty big deal as the second way will lead to filtered posts becoming less "seeded" and might eventually become lost forever. On the other hand I really don't want to download thousands of spam posts just to filter them every time I visit a new board.



>Do users have to download the whole linked list of posts first and then the client filters them out of the UI or does it process the filter list first and prevent blocked posts from being downloaded?

The latter. You raise a good point, though I don't think it should be much of a problem in practice. I figure if people don't like a mod there'll be plenty of people not subscribing to it - and so contributing to the health of those filtered posts. Also, the mods themselves still see filtered posts (marked as hidden) so those posts are still active in their local daemons.

File: 5bc023484abcf12⋯.png (7.34 KB, 128x128, 1:1, 128px-Feed-icon.svg.png)


Too many browser threads. Let's have an RSS thread.

What RSS reader do you use?

What tech-related RSS feeds do you read and recommend?

What non-tech-related RSS feeds do you read and recommend?

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



ur a firefox, u hottie



making an aggregation for a particular niche

have 100's of feeds and will combine all the feeds results and resort them by date, making an html index page of the last 1 or 3 days posts.

want to update once a day so crawling these feeds everyday would not be too harsh.

- am i dealing with different formats or would it all be pretty standard?

- how do i properly sort the results so i can work with the data?

- anything better to use for this than than curl or wget? i'm going to go with curl, i have more experience with wget and want to try something new.

ive made something similar before for craigslist and the stuff i did to make the data workable was really hackish with lots of sed and grep. so i'm also wondering whats the best procedure.


File: 90f6164366d0ae5⋯.png (Spoiler Image, 6.12 KB, 150x113, 150:113, logo.png)

Sage goes in all fields.


File: d271ee1fae3c364⋯.jpg (22.91 KB, 447x306, 149:102, sage_negated.jpg)


gnus in emacs

File: 3605bccd43f13c1⋯.jpg (67.42 KB, 200x245, 40:49, strstr.jpg)


Why did he have to set programming back by 20 years?

45 posts and 5 image replies omitted. Click reply to view.



>they compile to the same code

Either you are not using virtual destructors or you don't know about the pointer to the vtable that is added. C++ requires a person read a few 1000 page books and the language reference. You have to understand undefined behavior even for things like the modulus operator, and understand behavior between versions. Also compiler differences and differences between platforms.


The only valid languages are C and Scheme, and our entire tech world would be much better if this was a reality.



>Either you are not using virtual destructors or you don't know about the pointer to the vtable that is added.

Pretty sure he was referring to plain old ordinary classes, here. Not sure how you could infer that the guy doesn't know about pointers to vtables.




What the fuck is this shit? You're only printing the unformatted format string there at the end, there's no formatting going on here. Are you high?

#include <stdio.h>
#include <string.h>

// makes abs () unnecessary.

#define print_templ(name, type) \
int print_##name (type val, int base) { \
int neg = (int < 0); \
char *buf[21]; \
char *ptr = buf+20; \
if (base < 2 || base > 36) { \
return -1; \
} \
*ptr-- = '\0'; \
while (val > 0) { \
*ptr-- = digits[35 + val % base]; \
val /= base; \
} \
if (neg) putchar ('-'); \
puts (ptr); \
return strlen (ptr); \

print_templ(uint, uintmax_t);
print_templ(int, intmax_t);

int printf (const char *fmt, ...) {
va_list *ap;
va_start(ap, fmt);

int c = 0, tc, lo;
const char *snf, *sdp, *cur = fmt, ts;

tc = 0;
lo = 0;

// skip double percents and non-formats
for (snf = cur; *snf != '%' && *snf; snf++);
c += snf-fmt;
cur = snf;
for (sdp = snf; *sdp && sdp[0] == '%' && sdp[1] == '%'; sdp += 2, putchar ('%'));
c += sdp-snf;
cur = sdp;

if (*cur != '%' || cur[1] == '%') goto start;
if (!*cur) return c;

switch (cur[1]) {
case 'c':
tc = 1;
putchar (va_arg(ap, /* char promotes to */int));
case 'd':
if (lo)
tc = print_int (va_arg(ap, int), 10);
tc = print_int (va_arg(ap, long long int), 10);
if (tc < 0) return
Post too long. Click here to view the full text.

Delete Post [ ]
Previous [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]
| Catalog | Nerve Center
[ / / / / / / / / / / / / / ] [ dir / egy / firechan / fukemo / fur / kemono / occult / sonyeon / strek ]