Smizaxxed

who wants to late night drunk code

Attached: 3200.jpg (640x570, 101.79K)

Other urls found in this thread:

parallax.com/product/32912
forth.com/starting-forth/
advsys.net/ken/voxlap.htm
fabiensanglard.net/rayTracing_back_of_business_card/
thebeerstore.ca/beers/molson-dry
youtube.com/watch?v=wlR5gYd6um0
imgur.com/a/VIeM3)
en.wikipedia.org/wiki/Fast_inverse_square_root
advsys.net/ken/voxlap/groufst2.bas
discord.gg/Fzup3pd
twitter.com/SFWRedditVideos

I am not old enough to drink alcoholic beverages.

niether am i faggot

Show us your boypussy

but what about code
its what i made this thread for

You can code AND cock.

but can we code cocks
i think not
unless we get a 3d printers that prints biological matter

fuck it, i lost my buzz
you guys are low energy as fuck

What system are you programming for? We doing 32 bit x86?

i was thinking straight c
lets do something demoscene-ish
been itching to do something graphical

did you steal that from a display shelf

did we get a logo done or not

Confirmed drunk. (On cheap sherry.)

Attached: out.mp4 (338x500, 256.97K)

Well, looks neat

excellent work user, youve inspired me to break out my proto board

no, google images
i actually used to have this same model, i got it out of a thrift store in PA for $20

>parallax.com/product/32912

well now i know why it was $15, the audio jack is fucked and wont play music
gg rip

Time to heat up your soldering iron then.

well i did everything the guide says to do, the audio is in 32khz mono 16bit PCM yada yada yada etc
and then i use wav_playing() to check that the music actually got loaded off the sd card
and then i played music from my pc to make sure my speakers were working
and then i looked carefully at the audio jack
there dont appear to be any loose connections or fucked solder
so i honestly have no fucking clue what the issue is
fucked DAC?

but no, the dac is labeled and it looks fine

Gas Plasma screen masterrace

Same boat. found some molson dry in the backlane on my way home from highschool though. i hope it's enough to take effect.

Attached: 20180322_192347.jpg (2576x1932, 1.57M)

I'd be up for something in C even if I'm not a big fan of it.
Not a big fan of graphics either but I could do some basic raster graphics or just work in the backend ig.


Reverse engineering, cracking or interesting challenges would be fun too.

pic related was pretty fun and easy

Attached: rc4.png (640x407, 41.27K)

Damn the beers really kicked in. time to go to bed.

m8
assuming those are 12 ounce cans
thats only 48 ozs
fucking lightweight

forth is pretty cool
still learning though, i have a pdf of an old book called "starting forth", the guy who wrote it have an amazing teaching style

i wanted to do a voxel engine but the math is crazy
3d raycasting and super compact voxel data structures and all sorts of shit

Yeah, it's pretty enjoyable to program with.
forth.com/starting-forth/ try that instead of the book ;)

pic related, something I'm working on rn (doesn't work for certain sizes)
I actually wrote most of it straight off the bat instead of doing it interactively like maybe I should have, oh well.


You have that business card sized ray casting engine in C. I saw a dissection of it somewhere.
Would be cool to have anons re-implement it from that dissection in C or whatever language they want.

Attached: sierpinski.png (638x166, 25.66K)

its right here, source code and everything: advsys.net/ken/voxlap.htm
tried to dissect the c version but theres a fuckton of inline asm and insane maths with no explanations
still working on comprehending the toy example in QBASIC

also, thats the same book im reading :)

O only skimmed through that link, but I was talking about this: fabiensanglard.net/rayTracing_back_of_business_card/

Maybe we should write a good description of it and have user's implement it.


And yeah, I just thought the website might be more practical ;)

Attached: turbo-libre.png (255x172, 7.57K)

im fully erect
god bless you user

w-why?!

Attached: fig-forth.jpg (686x1130, 231.78K)

i just transitioned to technosexual

Well, if you're talking about the pic I posted, then it was inspired by this one posted in the lainchan forth thread.

A guy in my forth discord server optimized the r> swap >r >r by doing r> 2>r instead and the opposite for the other piece of code.


If you're talking about the link I posted, then yeah, it's pretty fucking crazy shit. That kind of stuff should be way more popular tbh. Maybe we wouldn't have so many soydevs if it was :/

Attached: libre.jpg (480x163, 16.53K)

i actually was talking about the link yeah
but the forth is great too, is that the start of a lisp interpreter?

It's a """full""" lisp interpreter in a sense.
It just pushes the execution token of the word after ( and then pops it and executes it when ) is called.
It allows you to use s-expressions/Lisp syntax in Forth.


And yeah, I need to do some shit with the Netpbm formats, they're a god send.

Attached: stack-vs-gf.jpg (640x750, 50.28K)

Fuck netpbm, use farbfeld.

Looks slightly harder to work it but superior in all other aspects, thanks user.

Attached: enbies.png (1172x965, 690.34K)

It's pretty easy to work with, x/y pixels is just math on dimensions, I'd write a gforth/retro implementation but I'm writing a Punyforth driver for the VL53L0X for university at the moment (due in a couple hours)

HRNNNNNNNNNNG
lets not derail this into a fag hate thread, keep coding well, fizzbuzzing

Attached: acdb0dd8c3dbc02ae14c688491b1c29d5da474c056ccfa63bcfaccd39e9f6332.gif (450x450, 1.57M)

Shit, sounds fun. I really need to get a Forth running on my arduino.

I'll see about doing some stuff with farbfeld and Forth tomorrow.

Attached: Ctraps1.png (602x303, 47.84K)

UNTIL NOW

Attached: loopy.png (985x877, 86.05K)

What the fuck is wrong with people, jesus christ

What's wrong with pointers?

theyre unsafe user
smoke rust instead

unsafe?

Attached: who_gives_a_shit.gif (175x144, 885.47K)

yes, rust will handle all that "memory management" and "variable referencing" stuff for you user
its called humor

Ok. If that's your brand of humor.

next level bait mate

Attached: thinking.png (1080x1080, 404.89K)

farbfeld is pretty cool, thanks.

What were you looking to do with it?

Attached: farbfeld.png (640x197, 19.22K)

Attached: farbfeld.png (645x200, 19.39K)

I've one of these, the gas plasma screen's really neat. The plastic has become very brittle over the years, though.

Found the american. enjoy your 4% nigga

Attached: test.png (669x392 696.23 KB, 44.24K)

been using devcpp since i started coding, im just comfortable with it
tried a whole bunch of other text editors, gui and cli, all of them were missing some feature that i had grown used to (bracket autocomplete, variable monitoring while debugging, ctrl-click to find function header or class dec, etc)
and sure i could be autist and write scripts to implement missing functionality but why bother when i already use ide that Just Werkz™

also, not complaining, its called a joke you dense faggot

and the code is the solution to a problem someone posted on lainchan, which is supposedly a google interview challenge
inb4 lainchan rant

I will, the beer is less expensive
$0.75 a can m8

Sounds like you need vim/neovim with some plugins and a decent debugger then fam.

Yeah ik, that's why I called it bait kek.

That problem is actually pretty interesting, simple because of how unfit it is to regular programming logic/control structures. Not sure how useful of a test it is tho.
I've mentioned lainchan in this thread before, you're fine

Attached: forth.gif (494x335, 381.85K)

Fuck yeah, mah user.
I am working on a damn IRC client for damn months now. All I got working was an IRC v3.2 compliant parser, but no actual UI for users to work with and use.

thebeerstore.ca/beers/molson-dry

Dude, can I use this Forth programming to wreck my G3? I know it's OpenFirmware is Forth based, and I've gone into it to load weird bootloaders, but I've never programmed for it. If I study Forth, can I write a firmware for a PCI video card and get some sweet hardware graphics acceleration beyond the ATI Rage 128 pre-installed?

ive tried vim on several occasions
could never get the feel for switching back and forth between modes and using commands to move the cursor
i know its supposed to improve productivity or whatever by keeping you away from the mouse but i cant get accustomed to it

You are stuck within the GUI world mah user. Get rid of that mentality. Text, keyboard commands and movement, direct control: these are what you need user to excel in this world.

Attached: 3cdb2d31038727ac9595272e19e647df71771d0e5206d61e3d3d4a995f16f459.jpg (858x1669, 224.91K)

well i guess ill give it another go
however, the real question is emacs?

Why do you need it? Does it really enhance your productivity beyond other IDE's or even a simple text editor?

idk
anons were shilling it hard a while back
"its literally an operating system, youll never use any other software ever again!"

I originally used Emacs because I was a lisper and having your whole programming environment in an extremely powerful Lisp VM is pretty fucking comfy but man is it bloated.


After watching a few youtube videos on vim (no bully) I decided to make the switch to vim+tmux and it's fucking great. It's way closer to the Unix way and really pushes you towards learning your terminal and system in general (I recommend zsh if you're lazy btw).

Here's one of those videos btw: youtube.com/watch?v=wlR5gYd6um0
I recommend watching a few before diving into it, just so you know at least the basic idea behind vim. It's really quite simple and much more suited to humans than Emacs and many other bloated IDE's.

Attached: forths.gif (1267x972, 73.57K)

how i would i rig vim so f11 compiles and runs the current file with g++
ive grown really attached to that feature

I use a plugin that allows me to run a command on another tmux window with just a press of a sequence or a hotkey.

When I start working on a project, I press a sequence, I input the command I want to run and then press enter. It runs it and saves it. Then, all I have to do is press another sequence/hotkey and it'll automatically run that command.

This allows me to use just one plugin for pretty much any project I want. It could be a simple fizzbuzz in Forth, it could be some C or it could even be writing code for the kernel and compiling it, and all of that with just one plugin.


Not only that, but this plugin also lets me seamlessly transition between Vim and Tmux windows. This is basically the only plugin I really need, the rest I rarely use.

Getting shit initially setup (vim, tmux and zsh) is really the hardest part, so feel free to mish and mash configs you see online, that's what I did. All my configs are based on other people's configs.

Attached: c-code.jpg (653x434, 38.27K)

ok thats cool then
also one more thing
how badly does a VM degrade performance
i happen to be hedonistic individual with a predilection for vidya, so i still use windows

and i actually dont give a fuck about insecurity; all i have is code, pron, and memes, so if the nsa wants to browse, thats fine with me unless they copy and upload those embarrassing photos of me at the christmas party

Attached: netcafe002.jpg (900x600, 507.25K)

If anons are shilling it, you know to stay away.

just like infinity next

Not sure, never used Linux on a vm.

Learning Linux, vim, tmux and zsh/bash all at the same time is probably way too much anyways tbh. I'd recommend you dualboot Linux and just use Emacs to start off with (it's easier for beginners) or, if you're really set on being a gaymerfag forever and are too scared to dualboot, a vm running Linux (the lag might be too much tho).


I'd highly recommend running Linux only, no dualbooting or VM crap, just so you force yourself to do everything in it and don't run away when it gets too hard. That's how I and most people really got started with it.

If all you're using Windows for is gaymes then Linux will probably be a good way to great out of it (although you can certainly do some light gaming in Linux now a days), it was for me and while it wasn't easy, I'm very glad I did it. I'd probably be a /vg/ soyboy by now if I hadn't done it tbqfh.

pic related, vidya is a jewish trick

Attached: homo-cartoons.jpg (653x434, 29.8K)

ive used linux before, im just too lazy to setup dualboot right now
actually that has me thinking, would there be any way to hotswap OS's? like literally just save state of one OS and load state of another? that would be awesome if even remotely possible

and vidya is just fun game, idk why people here are allergic

Attached: wut.gif (400x224, 3.65M)

I THINK I might have heard of people doing that kind of stuff once or twice, might be just my imagination tho, not sure.


We don't hate vidya, we just wish we would have grown out of it earlier ig. It's a great way to get into tech and even programming, but it's hard to move on from it, especially now a days.

Attached: gcc1.jpg (480x360, 25.19K)

seriously though
wouldnt it be cool to have some way to save the cpu state (cache, registers, etc) to memory and load the state of another
literally have an operating system to manage operating systems like programs
what kind of hardware support would be necessary

Yeah... you're making it cancer now.

Attached: soy.png (201x250, 9.26K)

Software can do that right now. Hardware...you will need direct memory access and other peripheries. It's not impossible user.

yeah, i started with blitzbasic cause i wanted to make vidya, and then i started to get into doing demoscenish type stuff, and then just started learning general CS

wrote my own emulator last month, a few games are still incompatible but im proud nontheless :)

how so, you fucking faggot
literally could swap between wangblows, loonix, and fagOS on the same pc at the press of a button without rebooting or vm

oh, i thought you were talking about:
do you not remember when hotwheels tried to "upgrade" Holla Forums?

You can kind of do this already, it's called a hypervisor, for example Xen

the floppy drive was fucked on mine

Attached: 096bb806839abe634c4d679d4587a7733cb2d4feaf3a0633796fc30eaf7df7ec.jpg (600x450 117.3 KB, 73.59K)

Well to be fair it's not super practical. I looked into it once for muh gaymen, but long story short because of discrete GPU PCI initialization windows would have to use a separate monitor. Nice to not have to reboot, but not if I lose a dedicated monitor.

but doesnt that let you play windows vidya on one screen and code on linux on another, off the same pc?

Good for you user, I wish I had gotten into the demo scene, it's some pretty fucking nice shit.


What hardware were you emulating? Implementing a machine is always a comfy way to grok it

It's fucking bloated af and unnecessary.
The guys that implemented that shit in software must have been a very rare combination of genius and crazy.


I'd be interested in seeing where this could go if we somehow got it to run in the Intel ME or something like that.
I don't have a use for it tho.

Attached: life.gif (500x666, 42.51K)

i did i regular ol beginners chip8
was extremely rewarding to see it work when i finished, am now working on gameboy emulator

Attached: hrnnnnng.png (351x832, 35.39K)

Yeah it sounds good in theory and I still kind of have an itch to do it, I'm just too lazy between the hassle of setting up video and keyboard/mouse switching. If I had enough desk space for 4 monitors I'd do it, but I've grown accustomed to coding with 3 monitors lol

i dont even have enough desk for 2 monitors but id make room

Attached: IMG_1386[1].JPG (3264x2448, 1.25M)

Ah yeah, I've considered making a chip8 emulator quite a few times, but I hate doing gfx so I've always noped out of it.
Brainfuck is one of the things I implement in every language I learn and it's a surprisingly good test of the language.


I'd love to implement a stack based machine, something like the soviet Setun computers. M-maybe I should implement something that uses binary base and has source code or at least good documentation available tho ;_;


Fug, I wanna get a midrange desktop with a widescreen and a mechanical keyboard so much.

Attached: forth-atari.jpg (904x1496, 628.45K)

graphics coding is easy once you learn the basics and api shit
try sfml or allegro, easy peasy
maybe talk to forth user, it should be easy to implement a lightweight forth interpreter

I-I am the Forth user tho ;_;

I hate working with bloated APIs, so when I do do gfx's it's all basic raster/framebuffer stuff.

Yeah, I've already experimented with a Forth inner interpreter for X86, including one variation that used a wheeler jump instead of a return stack.
The Setun is a ruskie kind of comfy tho. They claim it's still in use in Moscow University.

Attached: stalker.png (1280x768, 1.78M)

my mother used to bug out and throw my computers away
but i could always count on getting more from dumb people who threw 5 year old PCs out
go dumpster diving, people are stupid and hardware is plentiful
i found this monitor brand new in the box literally sitting on the ground outside of microcenter
go to the free section on craigslist
hard mode: strike up a conversation with someone and ask if they have any old computers they dont need or want anymore

basically, just hustle

ofuck son

yeah i wanted to learn pixel shader coding but all the tutorials are like "LETS LEARN OPENGL FIRST"

i just want simple thing where i can input per-pixel function

and shadertoy.com is too much bloat

I never considered this but you could actually just plug your monitor into discrete GPU and mobo at the same time, and use the monitor buttons to switch between inputs.

If you're interested I'd say go for it. Be warned though, you'll need to pass some kernel params in your bootloader to prevent PCI initialization until the windows guest takes hold.


If the Thinkpad X220 an upgrade for you I highly recommend it. Nice keyboard and battery life, corebootable, and if you're handy with solder you can hack in a 1080p IPS monitor (imgur.com/a/VIeM3)

Attached: 3039992a0fbe74b7c00d9e33006db374571f18e39cec088e31504231bddf7a2d.gif (1048x800, 48.07K)

but Tyrone, I live in a small Yuropoor country.

I went dumpster diving once before and literally found nothing of any use. I was gonna go right after xmas but then I got dumped so said fuck it kek.
I'll def do it again and check out my local CL to see if there's some free shit tho, thanks.

hehe

Oh yeah, I tired learning OpenGL and all that shit when I started out with gfx, but fuck do I hate writing 90% boilerplate code.

I'd honestly recommend you just code for formats like farbfeld, use the framebuffer on Linux (surprisingly easy to access) or use an API that provides something similar.

I might do some basic VGA fb graphics if I get to making a x86_64 Forth system. I remember the tty framebuffer in x86 that I used for my Lisp OS was extremely fucking comfy.

Yeah, it'd be a pretty nice upgrade, but I doubt I could find a decently priced one close to me.

My main reason for not getting one is that I really want a big screen and a proper keyboard tho tbh. I got the chance to use a pretty well sized screen for a while and it was orders of magnitudes less cancerous than bending down to code on my shitty laptop.

Attached: amigo.jpg (600x450, 52.83K)

also
then find a way to earn some shmeckels and buy a used laptop off murican ebay
you can get a good one for cheap

hi friend

Attached: me.png (674x826, 65.21K)

...

Oof, at least I'm not as big of a fag as OP, was close tho


I have more than enough money to buy a setup, I just don't want to shill out the money just to get another shitty laptop.
I'm waiting on prices to drop (implying they're gonna drop).

Fuck sorry, missed your post.
I don't even know what hardware you're talking about but, yeah I guess. It's probably cozy af programming bootloaders in Forth (fuck you Intel tsk tsk).

Mind telling me more about this hardware and what you're using it for?

Attached: Selection_502.png (356x408, 13.4K)

Oh, looks like you're talking about an iMac G3.
I've never actually seen one of those irl, but I'd love to play with it and maybe extend the bootloader into a reasonable Forth system? Who knows. (No idea if that's even possible given the limitations of the bootloader)

Have a rare Chuck because your post amused me.

Attached: Chuck1.jpg (312x298, 13.3K)

just trying to keep the thread going, whats wrong with that

i put together my pc for like $300, i bought cpu, mobo, cooler, and psu off a friend for around $220, and then shoved in into the cheapest case i could find and added a 560ti i got for like $40

*and ram

Yeah, I'm doing the same kek.
You should get a group together to do a few demos or something. IRC, discord or whatever meme you pick should do fine (I recommend discord tho tbh).
Doing crackmes or reverse engineering abandonware would be nice too.


I certainly have more than enough money for that mid range cheapo setup (no more than 500 shekels for the tower) but I really don't want to be buying that kind of stuff when I'm being a lazy NEET.

Attached: god.jpg (399x499, 28.16K)

you know we have to come up with a sick group name first, just on principle
im thinking FADED DEADBEA75, whaddya think?

just wait for some ebay shmuck to fuck up and list his 1080ti for 70$ instead of $700, snipe as fast as possible

oh oh, heres a good one: 10C0

0x5F3759DF

I actually already have a pretty big Forth Discord server. I could transform it into a Forth/Demo/RE server and give you admin if you wanted to.

Attached: 1513800954922.jpg (1519x2996, 1.71M)

isnt there a way to make a subchat, forthers and demosceners can exist in harmony

I actually don't use Discord a lot, so I'm not sure.
We could have a Forth and a Demo channel, if that's what you mean by "subchat". Sounds pretty good to me.

well we could do irc but im not sure how many people would use it
then again, autists might start bitching about discords
why not both?

also,

5F3759DF
sfetsgdf

and then i tried hex to ascii, am i missing something?

Stop using services which both disrespect your privacy and require you to run non-free javascript

literally one minute
absolutely fucking predictable

this
how do I get my gaymer friends to stop using discord and fb messenger

I've been considering switching to IRC, but IRC channels die so fucking quickly it's hard to believe. The good thing about Discord is that it encourages more casual posting from people that would generally only visit the channel for a few hours.


just google it dummy: en.wikipedia.org/wiki/Fast_inverse_square_root


Why are you on Holla Forums then? kek
and there are quite a few cli discord clients just fyi

Attached: the-ego.jpg (643x800, 61.13K)

I just quit discord. I don't even think I ever said a goodbye. I got fed up with how I was being treated and stopped using it.

Because it respects my privacy and doesn't require non-free javscript to use.

oh shit
its that magic number from the quake engine "wtf" code
i did not expect

Attached: z9IO4Hj.jpg (869x1776, 210.62K)

The problem is I don't know of a suitable alternative messaging client with scrollback. I would feel like less of a curmudgeon if I could just say "im outtie, hmu on XYZmessenger @anon123"

you stop having friends
you'll thank me later

We don't care about you being bullied by Chad and Stacey, kek.

And oh yeah, I'm sure the jews running this honeypot respect your privacy™ like it's Jesus himself.

Literally the number of the patriarchy. Females can't into mathematical magic.

Attached: smug-asuka.jpg (560x577, 71.32K)

*being treated by discord
I got along just fine with a few online buddies inside several servers.

Attached: 2018-03-23-222609_847x324_scrot.png (847x324, 33.08K)

user help me decode this fucking shit:
advsys.net/ken/voxlap/groufst2.bas
am currently trying to decipher the spell which this man has cast

I'd personally much prefer to use IRC, but we all know IRC channels never last long. I actually wrote some gforth code for a simple IRC bot expecting to move my Discord server to freenode.


I'm more than willing to have an IRC bridge for those that want to use it, but the incentive to lurk and irregularly post that Discord gives is invaluable for a small group like this.

Attached: cute-snek.gif (500x600, 132.44K)

What fucking language is that supposed to be? A particularly bad version of Basic?
No idea what it's trying to do tbh.


I remember that neat piece of quake code is extremely hard to understand. Even when you have someone break it down into steps, it still requires you to understand IEEE floating point representation and some pretty neat math tricks.
those last lines which he calls 1st and 2nd iterations are actually just a way of improving the approximation using Newton's method, really neat shit

Attached: 1499550141795.jpg (544x533, 31.98K)

yeah the magic number is supposed to improve precision
i have no fucking idea how though

also yeah, its qbasic, it generates and raycasts a voxel height map in realtime

There are some pieces of code too ugly for even this world, user.
Bury that shit and forget about it, wew.


And yeah the magic is used to do the initial approximation and that 1st iteration simply refines it pass a point where it's good enough.


Just to be clear, this is an amazing hack not just because of the extremely clever nature of it, but also because this is what allowed Quake to have a proper 3d engine before GPU's were really a thing.
This inverse square root function was at the heart of the raycasting engine that ran on the CPU. (I think it was mainly used to calculate the angle of the light/ray after reflection/casting)

Attached: 1499015883009.png (482x479, 226.89K)

discord.gg/Fzup3pd
ok here
first 10 anons get top dog status

inverse square root is used for normalizing vectors
basically it transforms m*cos(x), m*sin(x) to cos(x), sin(x)

Yeah, isn't that a part of calculating the reflection angle in a raycasting engine?

yeah