Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

carry on then posted:

my computer organization course was in masm and it wasn't too bad imo, but we stuck to ia-32 so maybe amd64 is worse?

Same, it wasn't so bad and I even made a space invaders game with it

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

VikingofRock posted:

Hey male shoegaze if you're getting exponential compilation times you should file an issue on the rust GitHub. They take solving that sort of thing pretty seriously so I'm sure they would be very interested in hearing about your case.

yeah i plan to. i only hit the issue last night and i need to isolate a test case first because my poo poo is pretty crazy right now.

gonadic io
Feb 16, 2011

>>=
Circleci goes down during us trying to hotfix prod. Fml.

netcat
Apr 29, 2008
If you want a light start with assembly and low level programming I'd suggest tinkering with an 8 bit cpu like 6502 or z80. Make nes or gameboy homebrew

Luigi Thirty
Apr 30, 2006

Emergency confection port.

yeah nes is really well documented and doesn’t have too much to trip you up. plus you get to show off your cool Nintendo game!

6502 is real simple but has just enough kinks to make you think

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

MALE SHOEGAZE posted:

JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time.
Why tho? It's one of those things that you never do unless it's absolutely necessary or you're Codier Than Thou.

(Keep in mind I'm a lazy bitch and the last time I ever did it was a FizzBuzz for a company that I figured wasn't going to hire me that I wanted to annoy)

gonadic io
Feb 16, 2011

>>=

Peeny Cheez posted:

Codier Than Thou.


This is amazing I'm stealing it

jony neuemonic
Nov 13, 2009

does nand2tetris cover “real” enough assembly language? because it looks like a rad course.

mailorder bees
Nov 4, 2011

FLUFFERNUTTER
Codier than Thou is a phrase i've been needing, perfect.

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

i ams an wordsmith

edit: But if you must, 6502 is a good way to start. It'll get your head around the core concepts and there's like 40+ years of examples and people trying to do whatever you're trying to do.

Ellie Crabcakes fucked around with this message at 19:37 on Jul 19, 2018

JawnV6
Jul 4, 2004

So hot ...

Peeny Cheez posted:

Why tho? It's one of those things that you never do unless it's absolutely necessary or you're Codier Than Thou.
i have a bigger post coming, but i reach for asm like... all the time. and it's only half because im really bad at anything above C

but i really can't imagine doing anything low level without some reading. sure don't go memorize the ISA/PCS/ABI, but be familiar with the documentation and how to read it. i don't inspect most asm i generate, but in a debugging or investigation that step is crucial

mailorder bees
Nov 4, 2011

FLUFFERNUTTER
every time ive messed with asm, i've had several documentation sources open. it's been a while, but sometimes I play with gameboy stuff and that's in a funky version of z80

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

VikingofRock posted:

Can we talk about the elephant in the room here? What possessed everyone to use

C++ code:
/* these comments */
instead of

C++ code:
// these comments
? C99 turns twenty next year...

and Visual Studio will finally support it

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

tinaun posted:

male shoegaze you should write a blog chronicling your HKT rust adventures, there's fp nerds on the lang team who would probably love to read about it

they might also start treating some of it as a test case, ensuring it gets recognized, compiled, and optimized as best it can

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

MALE SHOEGAZE posted:

JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time.

don't say reading luigi's posts

you could do worse than to read her are posts

but really, fooling with something like 68K In emulation can really help you get a feel for it

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

jit bull transpile posted:

i learmed mips assembly for my compilers class and it was a pretty easy way to get my toes what with an assembly language. i have no loving clue how well that translates to the x86 shibboleth because ive never tried to gently caress with that poo poo.

i did too. if one's goal is to learn the general theory and practice of how native code is executed on hardware, I'd definitely suggest going with an easy to learn architecture like MIPS


Peeny Cheez posted:

Why tho? It's one of those things that you never do unless it's absolutely necessary or you're Codier Than Thou.
(Keep in mind I'm a lazy bitch and the last time I ever did it was a FizzBuzz for a company that I figured wasn't going to hire me that I wanted to annoy)

knowing about computer organization and assembly language isn't 100% a prerequisite for being a good programmer, but it's something that can help in several areas. understanding how your algorithms and data structures will exist and run on hardware is helpful in debugging, especially when you're trying to diagnose or improve performance problems. it can also be helpful when you are having problems on one type of hardware but not another

Soricidus
Oct 21, 2010
freedom-hating statist shill

Lutha Mahtin posted:

i did too. if one's goal is to learn the general theory and practice of how native code is executed on hardware, I'd definitely suggest going with an easy to learn architecture like MIPS

just ... not the kind of mips they used in ps1-era consoles, in which the instruction after a jump is always executed even if the jump was taken, and the instruction after a read or store will still see the old value

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

nah just download the SPIM simulator to start with. it uses regular old mips32. it also lets you monitor system values, inspect memory, and other fun stuff. you won't be making video games with it but it's useful for learning the basics

http://spimsimulator.sourceforge.net/

Sapozhnik
Jan 2, 2005

Nap Ghost
Learn RISC v then

Similar to MIPS except no delay slots or weird multiplication registers and in 2018 it is exactly ad relevant as MIPS ie not at all

JawnV6
Jul 4, 2004

So hot ...
i keep trying to figure out who risc-v is for besides academic wanking

certainly enthralled a bunch of x86 expats i know, but the only credible investor storytime i heard was "china phone makers" who don't give a poo poo about the 3 encumbered MIPS shift instructions anyway

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

does the "open" part of risc-v even matter really? like wouldn't you still be dealing with patents and crap for other parts of the chip design/manufacturing, and also if you wanted to include any other useful hardware in a device

Sapozhnik
Jan 2, 2005

Nap Ghost
i mean there's something to be said for entire $1bn-$1tn market sectors not being intel's or qualcomm's bitch but we're at least a decade away from breaking those strangleholds

it's cool in the meantime but yeah not very relevant beyond academic exercises.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

learn ia64 op

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
Ok. I ran into a bug the other day that is just... incomprehensible to me.

Long story short, I'm working with an arduino-based project that uses ArtNet for controlling some lights. ArtNet is basically DMX sent via UDP packets. I'd fiddled with a test program a bit, and it worked great. I basically copied the code from that directly into my actual program. I use a seeedstudio W5500 Ethernet breakout board for my network connection.

So a few days ago, I start doing testing of the code, most of which was untested and written while waiting at airports. I'm mostly testing that state-changes and logic works well, and I'm not particular concerned about the Artnet portion of the software, since it's very simple, and I do simple lighting ramps all the time. So, I have the arduino connected to a network for some other UDP-based functions, but I don't bother to connect the Artnet receivers.

I notice during the setup(), where I do a quick light fade, that the for() statement is taking forever. Like, each Artnet packet is taking literally 5 seconds to go. It's nuts. I can't suss out what the code issue is, so I eventually just comment it out and worry about it later. I eventually run the original test program, and it's doing the same thing!

So now, I finally hook up the Artnet hardware to see if it really is acting that slow or if my feedback is just acting stupid. The lights connected to the receiver start cycling nice and smooth. I look over, and the serial feedback is spitting out numbers 40 times per second, like I expect. Further experimenting reveals that the critical issue is if an ArtNet device is connected to the network at the proper IP to receive the command. If there's a receiver, it works great, if not, the software crawls.

This makes absolutely no sense. The device shouldn't care if the UDP message is being received. Heck, I don't think it has any way of knowing. WTF? Maybe it's something in how the arduino UDP stack is implemented. Maybe something with my switch bouncing back those messages and filling up the W5500 chip's buffer? I don't know. Anybody have insights?

For reference, here's the test program I used for my ArtNet Stuff:
code:
/*
Chaned some things for Arduino 1.0

ARTNET SENDER

This SCRIPT allows you to use arduino with ethernet shield or wifi shield and send dmx artnet data. 
Up to you to use logics for channels as you want.

It works with Arduino 023 software

If you have implemented ameliorations to this sketch, please, contribute by sending back modifications, ameliorations, derivative sketch. 
It will be a pleasure to let them accessible to community

This sketch is part of white cat lighting board suite: /http://www.le-chat-noir-numerique.fr  
wich is sending data to many different types of devices, and includes a direct communication in serial also with arduino as devices
You may find whitecat interresting because its theatre based logic ( cuelist and automations) AND live oriented ( masters, midi, etc)

(c)Christoph Guillermet
[url]http://www.le-chat-noir-numerique.fr[/url]
[email]karistouf@yahoo.fr[/email]
*/

#include <SPI.h>         // needed for Arduino versions later than 0018
#include <Ethernet2.h>
#include <EthernetUdp2.h>       // UDP library from: [email]bjoern@cs.stanford.edu[/email] 12/30/2008

//MAC and IP of the ethernet shield
//MAC adress of the ethershield is stamped down the shield
//to translate it from hexa decimal to decimal, use: [url]http://www.frankdevelopper.com/outils/convertisseur.php[/url]

//TO EDIT:
// the next two variables are set when a packet is received
byte destination_Ip[]= {   192,168,0,253 };        // the ip to send data, 255,255,255,255 is broadcast sending
// art net parameters
unsigned int localPort = 6454;      // artnet UDP port is by default 6454
const int DMX_Universe=1;//universe is from 0 to 15, subnet is not used
const int number_of_channels=512; //512 for 512 channels, MAX=512

//HARDWARE
byte mac[] = {  0x2C, 0xF7, 0xF1, 0x08, 0x12, 0xA6  };//the mac adress of ethernet shield or uno shield board
byte ip[] = {   192,168,0,116 };// the IP adress of your device, that should be in same universe of the network you are using, here: 192.168.1.x

//ART-NET variables
char ArtNetHead[8]="Art-Net";
const int art_net_header_size=17;

short OpOutput= 0x5000 ;//output

byte buffer_dmx[number_of_channels]; //buffer used for DMX data

EthernetUDP Udp;

//Artnet PACKET
byte  ArtDmxBuffer[(art_net_header_size+number_of_channels)+8+1];


void setup() {

  //initialise artnet header
  construct_arnet_packet();
  // démarrage ethernet et serveur UDP
  Ethernet.begin(mac,ip);
  Udp.begin(localPort);
  
  Serial.begin(115200);
}

void loop() {
  for(uint8_t i = 0; ;i++){
       buffer_dmx[0]=i;

   construct_arnet_packet();
   
   Udp.beginPacket(destination_Ip, localPort);
   Udp.write(ArtDmxBuffer,(art_net_header_size+number_of_channels+1)); // was Udp.sendPacket
   Udp.endPacket();
   Serial.println(i);
   delay(40);
  }
}

void check_arduino_inputs()
{
 //data from arduino aquisition

  int temp_val=0;
  for(int i=0;i<6;i++)//reads the 6 analogic inputs and set the data from 1023 steps to 255 steps (dmx)
  {
    temp_val=analogRead(i); 
    buffer_dmx[i]=byte(temp_val/4);
  }
}


void construct_arnet_packet()
{
     //preparation pour tests
    for (int i=0;i<7;i++)
    {
    ArtDmxBuffer[i]=ArtNetHead[i];
    }   

    //Operator code low byte first  
     ArtDmxBuffer[8]=OpOutput;
     ArtDmxBuffer[9]= OpOutput >> 8;
     //protocole
     ArtDmxBuffer[10]=0;
     ArtDmxBuffer[11]=14;
     //sequence
     ArtDmxBuffer[12]=0;
     //physical 
     ArtDmxBuffer[13] = 0;
     // universe 
     ArtDmxBuffer[14]= DMX_Universe;//or 0
     ArtDmxBuffer[15]= DMX_Universe>> 8;
     //data length
     ArtDmxBuffer[16] = number_of_channels>> 8;
     ArtDmxBuffer[17] = number_of_channels;
   
     for (int t= 0;t<number_of_channels;t++)
     {
       ArtDmxBuffer[t+art_net_header_size+1]=buffer_dmx[t];    
     }
     
}

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Looks like X really gave it to ya

VikingofRock
Aug 24, 2008




jit bull transpile posted:

Looks like X really gave it to ya

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

jit bull transpile posted:

Looks like X really gave it to ya

redleader
Aug 18, 2005

Engage according to operational parameters

jit bull transpile posted:

Looks like X really gave it to ya

mailorder bees
Nov 4, 2011

FLUFFERNUTTER

jit bull transpile posted:

Looks like X really gave it to ya

pseudorandom name
May 6, 2007

ARP timeouts?

fritz
Jul 26, 2003

Soricidus posted:

just ... not the kind of mips they used in ps1-era consoles, in which the instruction after a jump is always executed even if the jump was taken, and the instruction after a read or store will still see the old value

I've mentioned the weirdo isa I write in at work sometimes and it's got nice deep delay slots for all sorts of instructions

cinci zoo sniper
Mar 15, 2013




re: dropped prod database. turns out a team lead confused two projects and thought he was in the test environment of project B, when he was in prod environment of project A. thankfully there were actual nightly backups and everything was restored in order fashion, sans literally a dozen primary licence keys being invalidated

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

and the backup works as well? wonders never cease

cinci zoo sniper
Mar 15, 2013




Boiled Water posted:

and the backup works as well? wonders never cease

weirdly enough i only had to remind twice about broken replication, otherwise it did work as advertised

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
lol there’s a loop in our message bus wreaking havoc. i warned that this would happen if we continued to rely on kinesis as our only method of ipc for our 30+ micro services, but service to service calls are still forbidden because they create coupling

DONT THREAD ON ME fucked around with this message at 17:47 on Jul 20, 2018

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

No wonder a PhD track or learning assembly seems appealing to you at this point.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
phds are fine if you want to be in academics for the rest of your life and you hate writing good code.

but lol if you pay for your graduate studies, you'll never make the money back. if it's not paid for by the school it aint worth it.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
I honestly don't know much about how academia functions, I mostly threw the PhD thing out because if I'm going to go get an undergraduate degree at 32, I want to make sure that I'm getting the most out of it. If a masters is sufficient to unlock the jobs I'm interested in, that's fine.

But really, I think that I'll probably be able to get myself on the right path with a year of dedicated study, making open source contributions in the areas I'm interested in, and being willing to accept positions that pay less than I'm making now.

What it comes down to is: When I started my career, I chose web because it was the most accessible path for a very inexperienced programmer with no college degree. Since then, I've been operating under the assumption that webdev is just the best I'm gonna be able to do (as a terrible programmer with no college degree). But honestly, I'm a great programmer who works very hard and there's no reason for me to limit myself to webdev when I desperately want to do something else.

I shortsell myself ITT as a defensive mechanism because it's easier for me to pretend to not care than it is to care and be wrong. But honestly, I love this poo poo, I am serious about programming, and I don't want to spend my career figuring out how to shoehorn functionality into CRUD apps with developers who just want to clock out at the end of the day and never think about programming again (not that there's anything at all wrong with that, but it's not me).

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i do realize that im setting myself up for a big disappointment when i realize that everyone is doing garbage programming. but there must be fields that are better than webdev

Adbot
ADBOT LOVES YOU

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

MALE SHOEGAZE posted:

but there must be fields that are better than webdev
There are. Like this one:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply