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
zokie
Feb 13, 2006

Out of many, Sweden

duz posted:

our process that handles running scheduled reports absolutely can not handle when the last run time is in the future so when the time changes, it re-runs and emails the reports every minute for the duplicate hour
it is marked as wontfix as it only happens once a year

I’ve been involved in some software that schedules stuff, and in Sweden it’s common to describe biweekly stuff as happening on odd or even numbered weeks. Sweden is also one of the few places that actually uses ISO8601 and it’s week numbers, which sometimes go up to 53.

So what do you do when something is supposed to happen biweekly but also only on odd or even weeks and you have week 53 followed by week 1?

Adbot
ADBOT LOVES YOU

Kazinsal
Dec 13, 2011

Zlodo posted:

*poo poo++ maps directly to an addressing mode on the 68k (and I wouldn't be surprised if there was that on the pdp 11 too) and compilers were dumb in those days

yeah on the pdp-11 there are autoincrement and autodecrement pointer addressing modes that are written as (Rn)+ and -(Rn) where Rn is a register containing an address. in that example *s++ = *t++ can be compiled to something like movb (R3)+, (R4)+

there's also auto-deferred ones where you use @(Rn) instead of (Rn) to denote that the register is a pointer to a pointer

Presto
Nov 22, 2002

Keep calm and Harry on.

Sapozhnik posted:

It teaches you that it's good to use clever tricks like the infamous "while (*p++ = *q++);"
That's not a clever trick, that's the proper way to do it. :colbert:

Curvature of Earth
Sep 9, 2011

Projected cost of
invading Canada:
$900

Carthag Tuek posted:

but what does C have to do with rom hacks tho, werent they mostly written directly in assembly? & if not, was there a source code leak?

The first two generations of Pokemon games were written in assembly, the third gen used mostly C with a little C++, and gen four used mostly C++.

Also, lol, from the way I've heard people talk about assembly, I thought reading assembly code would be incomprehensible and esoteric. But I've spent the past couple weeks fussing with somebody's else's ROMhack of a gen II game, and actually it's more like... oh no, how will I ever figure out what the file called "moves.asm", and which contains a list of all Pokemon moves written in all caps, does? Truly, a mystery...

Kazinsal posted:

the pokemon rom hacking community is a batshit niche with all sorts of crazy decompilation stuff going on so it wouldn't surprise me if someone wrote some kind of object loader that can link compiled C into a specific set of game boy ROMs without issue

Pokemon games up into the DS-era (so, 4th gen in the series) have been decompiled by the ROMhack community at this point. And the decomps are reliable enough; you can even buy ROMhacks on custom cartridges from Etsy, if you're a hardware purist and only want to play your bonkers ROMs on the original hardware. As far as I know, no one's managed it for the 3DS or later games.

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


solid lol at using manually hacking a pokemon cart and writing it up on the internet as evidence of ability vs a truly acceptable corporate cv of:
  • excel skills
  • VBA
  • SQL once
  • unreadable documentation
  • Yospos

smdh at kids these days

FlapYoJacks
Feb 12, 2009
The best C book is C primer plus.
The best C++ book is C++ primer plus.

mystes
May 31, 2006

DoomTrainPhD posted:

The best C book is C primer plus.
The best C++ book is C++ primer plus.
Yes but how do you pronounce it?

darkforce898
Sep 11, 2007

Sapozhnik posted:

I haven't read K&R so take this with a pinch of salt but from what I understand it can teach you some very bad habits, since it was written in a very different time and in a very different context.

It teaches you that it's good to use clever tricks like the infamous "while (*p++ = *q++);" (because compilers were stupid and computers were limited but also because people like showing off their cleverness) and also promotes the Garbage In Garbage Out principle (but enough about my posting) which was the original sin that lead to most of the infosec hellscape we have today.

I have been programming in embedded c for years now and have basically learned that there's a 0% chance I will be smarter than the compiler.

Do things the most explicit way, and then let -02 take care of it. If it's hard to read, it's probably wrong

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
agreed, for most compilers, and for most constructs. I’m sure you remember the bad old days before gcc had everything or on weird arch’s or whatever lol

Kazinsal
Dec 13, 2011
I need to switch to clang and de gnuify my makefiles for my personal C project. those are the last two pieces of GNU software in my build chain except I guess technically GRUB since I use that as a PXE loader but I can just write a replacement.

FlapYoJacks
Feb 12, 2009

mystes posted:

Yes but how do you pronounce it?

C primer plus
C plus plus primer plus.

It's fun to say!

FlapYoJacks
Feb 12, 2009

Kazinsal posted:

I need to switch to clang and de gnuify my makefiles for my personal C project. those are the last two pieces of GNU software in my build chain except I guess technically GRUB since I use that as a PXE loader but I can just write a replacement.

Use CMake if you are using CLion.
Use meson otherwise.

darkforce898
Sep 11, 2007

Phobeste posted:

agreed, for most compilers, and for most constructs. I’m sure you remember the bad old days before gcc had everything or on weird arch’s or whatever lol

Nope! I am one of the few people who decided to get into C programming five years ago because it's the hot new poo poo (more like forced to because embedded programming is basically all c or c++)

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

darkforce898 posted:

Nope! I am one of the few people who decided to get into C programming five years ago because it's the hot new poo poo (more like forced to because embedded programming is basically all c or c++)

you lucky motherfucker. I missed most of it if I’m honest but the stuff I didn’t miss really made an impression. I threaten our ees with death if they even think about asking if a psoc is a good idea

Sapozhnik
Jan 2, 2005

Nap Ghost

Phobeste posted:

you lucky motherfucker. I missed most of it if I’m honest but the stuff I didn’t miss really made an impression. I threaten our ees with death if they even think about asking if a psoc is a good idea

a good policy

man i really need to get back into embdev

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Sapozhnik posted:

a good policy

man i really need to get back into embdev

it’s so good now. everything is cortex m. they got real apologetic about having to switch an upcoming device from an stm32g4 to an stm32l5 because [insert supply chain rant] and I was like Uhh yes very bad hate it (knows jr dev can adapt the hal in about two days and nothing else needs to change)

Xarn
Jun 26, 2015

Sapozhnik posted:

a good policy

man i really need to get back into embdev

Why do you want to go back to env that's generally even shitier than desktop?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



at least its not web

Armitag3
Mar 15, 2020

Forget it Jake, it's cybertown.


Web is fine, actually

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme

Phobeste posted:

you lucky motherfucker. I missed most of it if I’m honest but the stuff I didn’t miss really made an impression. I threaten our ees with death if they even think about asking if a psoc is a good idea

better than a poopsock

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Armitag3 posted:

Web is fine, actually

:wrong:

distortion park
Apr 25, 2011


just remembered the time our infra team set up a new fancy autoscaling policy but left the minimum and default instance count at 0

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


oh my god work fixed the security web proxy loving up SoundCloud, now im going to have to actually do some work

hbag
Feb 13, 2021

for my java module at uni we are being taught using the IDE "processing", which AFAIK is supposed to be used for graphical programs, and abstracts the living poo poo out of everything

why are we being taught general java using this

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
tight feedback loop? type a couple words see a thing move on screen

hbag
Feb 13, 2021

pokeyman posted:

tight feedback loop? type a couple words see a thing move on screen

i guess, but still
these fuckers are going to show up to a job interview with their java knowledge from this poo poo and not know a loving thing

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
or be correctly pissed off that getting anything done takes way longer than it should

hbag
Feb 13, 2021

people in this forum getting mad at me for not liking java and then people getting mad about java
this sure is yospos

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
you've been gifted an easy uni module of hacking out cool fractals and spirals and you're complaining? smdh

PIZZA.BAT
Nov 12, 2016


:cheers:


ynohtna posted:

you've been gifted an easy uni module of hacking out cool fractals and spirals and you're complaining? smdh

for real

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Xarn posted:

Why do you want to go back to env that's generally even shitier than desktop?

embedded is fun

at least the stuff i've done/am doing is

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



yea tbh that sounds way more fun than building a lame inventory tracking system or whatever the gently caress

hbag
Feb 13, 2021

less "cool fractals" and more uh



this guy

Sapozhnik
Jan 2, 2005

Nap Ghost
embdev is not yet completely infested with css and javascript although i'm sure it's getting there so it is better than desktop for that reason alone

hbag
Feb 13, 2021

seriously though look at this

this is the ENTIRE program (in processing) to draw that bike and make it go left to right across the screen
literally everything

Java code:
final color RED = color(255,0,0);
final color BLUE = color(0,0,255);

class Motorbike {
  int x = 5; // members
  int y;
  int speed=2;
  int size=30;
  color colour;
  
  // methods, procedures an object of this class can perform
  void render() {
    float wheelHeight = size/3;
    fill(colour);
    triangle(x,y,x+size,y,x+size/2,y-size/2);
    drawWheel(x,y,wheelHeight);
    drawWheel(x+size,y,wheelHeight);
  }
  
  void drawWheel(int x,int y,float size) {
    float inner = size*2/3;
    fill(0);
    ellipse(x,y,size,size);
    fill(255);
    ellipse(x,y,inner,inner);
  }
  
  void move() {
    speed = (int)random(5.0); // random step [0..5]
    x+=speed;
  }
}

Motorbike redBike, blueBike;

void setup() {
  size(500,100);
  redBike = new Motorbike();
  redBike.y = 25;
  redBike.x = 15;
  redBike.colour = RED;
}

void draw() {
  background(125);
  redBike.render();
  redBike.move();
}

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
reminds me of qbasic days

just open a blank file, write two lines of code and you've got a circle on the screen

why are you complaining again?

hbag
Feb 13, 2021

because im learning nothing and he's framing it like "this IS java, this is exactly what its like everywhere" and that makes me worried for the rest of these fuckers too

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


hbag posted:

less "cool fractals" and more uh



this guy

a reliant robin?

hbag
Feb 13, 2021

duz posted:

a reliant robin?

no that has THREE wheels

Adbot
ADBOT LOVES YOU

Ocean of Milk
Jun 25, 2018

oh yeah
All schooling is like this.

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