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.
 
  • Locked thread
comedyblissoption
Mar 15, 2006

if you're using C# and like linq/IEnumerable, get MoreLinq for a bunch of crap the standard library is missing

Adbot
ADBOT LOVES YOU

netcat
Apr 29, 2008
We have this weird homebrewn DSL for our test environment. It would be "fine" if it wasn't for the fact that it doesn't have stuff like functions. Instead you have to execute other scripts and pass all parameters as globals. Oh and of course all scripts modifies other globals so you have no idea what's going on

Bloody
Mar 3, 2013

comedyblissoption posted:

if you're using C# and like linq/IEnumerable, get MoreLinq for a bunch of crap the standard library is missing

also peep the (builtin) parallel linq poo poo if you haven't already

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

comedyblissoption posted:

if you're using C# and like linq/IEnumerable, get MoreLinq for a bunch of crap the standard library is missing

i implemented .Mode() using (abusing) .GroupBy() yesterday so thanks

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

on the subject of weird pointless heap allocations you can create in .NET without noticing, i have recently learnt that in F#
code:
let f x = x + 1
compiles to a perfectly ordinary function, but
code:
let f = (+) 1
allocates an object for some delegate / lambda / invoke / whatever pointless fuckery


https://dotnetfiddle.net/QkEJiM -> choose "view IL" in the menu at the top right

basically the answer to 90% of questions about f# and performance seems to be "inline that poo poo"

raminasi
Jan 25, 2005

a last drink with no ice
in f# if your let/use binding has no parameters it will make a thing and if it has parameters it will define a function. it's a pretty straightforward rule.

tef
May 30, 2004

-> some l-system crap ->

Bloody posted:

what is worse to work with: plangers or people who smugly insist that c++ is the best because performance

c++ users

tef
May 30, 2004

-> some l-system crap ->

Wheany posted:

Theory: let's use a dsl so that non-coders can write <whatever code>
Reality: non-coders still won't write code and coders want to use an actual programming language.

this why carmack abandoned quake-c and scriptable engines


- they made quakec so "the coders didn't have to write the code and the level designers could"

- they found that they spent most of the time debugging the quakec code

- ah gently caress it, let's write our logic in the same language so we have the tools


or "let's write a programming language for non programmers" is doomed from the outset with a patronising attitude and a naivety of the problem to solve

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

comedyblissoption posted:

c++ ... holy gently caress at the syntax

tef
May 30, 2004

-> some l-system crap ->

tef posted:

c++ users

they're like the lisp users of systems programming

no matter what you do, it could always be done faster in C++

any sufficiently complicated abstraction could be made easy by using an esoteric feature of the language out of common usage

that sort of person who tries to win arguments with the entirety of the language at their fingertips but unwilling to concede that production use requires subsetting such a beast of a language.

you can tell c++ has the lisp problem because heavy users come down with a bad case of making a new programming language that's just a little bit different



sure, it is limiting to bring in constraints and work in a less powerful language but with constraints come focus

many people think the measure of strength of a language is the lack of barriers, or a pay-as-you-go mentality for features.

after living with the wreckage of this mentality, i think language designers have a responsibility to limit and not empower programmers, there are enough reckless languages already. i mean pay-as-you-go works out in your favor when you don't use a feature, but when 90% of you code does maybe that whole "no-gc" thing doesn't work out


a programming language is kinda an executable manifesto on how the author believes you should be programming, and when you don't limit it in scope you punt that decision to the developers

and this is how you end up with 60 page coding conventions on how to write acceptable C++

tef
May 30, 2004

-> some l-system crap ->
devs: let's spend a lot of time removing runtime tagging of data for speed

ops: gently caress you too buddy

echinopsis
Apr 13, 2004

by Fluffdaddy
:golfclap:

echinopsis
Apr 13, 2004

by Fluffdaddy
so ue4 uses c++.. is it appropriate there?

tef
May 30, 2004

-> some l-system crap ->

echinopsis posted:

so ue4 uses c++.. is it appropriate there?

probably, because there isn't a great option for gamedev because performance is the most user-facing feature

i mean i'm not saying responsiveness isn't important but i've found that is a bit more architectural than a always down to language choice alone.

but a whole bunch of gamedev stuff is done in c# or even javascript atop (like unity).

going down to a language like C++ is fine, and often the entirety of a project means that it is reasonable to write at that level of control and responsibility

but in the end poo poo gets glued together to make stuff happen, so the idea that instead of "let's write our own special dsl to let people avoid coding" is bad but the idea of "well, let's do the heavy lifting in c++ and punt out to lua, c#, js" is very, very good

tef
May 30, 2004

-> some l-system crap ->
when i'm talking about c++ users I mean the people who think all of their code is important and thus must be written in a macho, powerful, unconstrained, heavy duty language because if it isn't performance critical or heavy lifting, why would anyone look up to them

DrPossum
May 15, 2004

i am not a surgeon
lol at anyone who thinks their code is important

Sapozhnik
Jan 2, 2005

Nap Ghost
yeah c++ definitely has a machismo thing going on

c is still the only game in town for embdev though.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

GameCube posted:

wheres ur github

https://github.com/Luigi30/polygon?files=1

The code is mega uggo tho (and you need Open Watcom to compile it)

VikingofRock
Aug 24, 2008




tef posted:

when i'm talking about c++ users I mean the people who think all of their code is important and thus must be written in a macho, powerful, unconstrained, heavy duty language because if it isn't performance critical or heavy lifting, why would anyone look up to them

That type of person sounds annoying, but for what it's worth lots of people use C++ for totally different reasons. It's a very popular language in the physics community (probably second to python) and I've never met anyone who uses it out of a machismo thing. A lot of people legitimately do need the speed (especially simulation writers), and there are a lot of physics libraries written in it (most notably ROOT for particle physics). Also everyone's advisors know it, so you can ask them coding questions whereas if you use something like Java you are on your own. (Also lol at using Windows in physics academia, so the entirely of the .NET languages are no-gos from the start.)

AWWNAW
Dec 30, 2008

Luigi Thirty posted:

https://github.com/Luigi30/polygon?files=1

The code is mega uggo tho (and you need Open Watcom to compile it)

this code is actually very clean. you must have autism, congrats

fritz
Jul 26, 2003

we do c++ in part b/c we need to run our computational stuff on a bunch of platforms and the intersection of supported languages are c and c++

MrMoo
Sep 14, 2000

AWWNAW posted:

this code is actually very clean. you must have autism, congrats

Object arrays as parameters are not very forgivable though.

C++ code:
    void draw_polygon(Point points[], int num_points, Point origin, int rotation_angle, int color);

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

VikingofRock posted:

That type of person sounds annoying, but for what it's worth lots of people use C++ for totally different reasons. It's a very popular language in the physics community (probably second to python) and I've never met anyone who uses it out of a machismo thing. A lot of people legitimately do need the speed (especially simulation writers), and there are a lot of physics libraries written in it (most notably ROOT for particle physics). Also everyone's advisors know it, so you can ask them coding questions whereas if you use something like Java you are on your own. (Also lol at using Windows in physics academia, so the entirely of the .NET languages are no-gos from the start.)

i write physics sims in c++ and god do i hate it

i hope rust eats a significant chunk of c++'s niche. not in physics (which probably wont happen), in general.

Sapozhnik
Jan 2, 2005

Nap Ghost
anybody who calls themselves a c++ expert is a liar

cinci zoo sniper
Mar 15, 2013




is there even anything better than saturday afternoon spent trying to plot data from a binary file that has no accompanying information concerning the specifics of the data contained

cinci zoo sniper
Mar 15, 2013




im slowly starting to hate whatever the gently caress python pretends to be doing with memory, and all the means to benchmark it that ive come across insofar

netcat
Apr 29, 2008
c++ is good

cinci zoo sniper
Mar 15, 2013




great, the most usable python profiler, apparently, doesnt work on x64

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

i've been seeing a lot of scala job postings around so i've started lookng into scala and it looks fairly ok to me. don't see a lot of love for it on the internet though. what are its hidden horrors?

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

NihilCredo posted:

i've been seeing a lot of scala job postings around so i've started lookng into scala and it looks fairly ok to me. don't see a lot of love for it on the internet though. what are its hidden horrors?

jvm, akka takes a while to get used to, community isn't really that big and there's only one big corporate "sponsor" - they used to be called typesafe and renamed recently iirc - and outside of akka I don't think their stuff is that great

fritz
Jul 26, 2003

NihilCredo posted:

i've been seeing a lot of scala job postings around so i've started lookng into scala and it looks fairly ok to me. don't see a lot of love for it on the internet though. what are its hidden horrors?

sulk did scala in a previous job and hated it

gonadic io
Feb 16, 2011

>>=

uncurable mlady posted:

jvm, akka takes a while to get used to, community isn't really that big and there's only one big corporate "sponsor" - they used to be called typesafe and renamed recently iirc - and outside of akka I don't think their stuff is that great

scala suffers a bit from being a hybrid in that the language has too many features.

make sure you're in a team with code review though and you'll be fine

e: also ask in the interview about scala implicits and if they don't immediately spit on the floor (or in your face) then walk out.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
I don't really have much animus against scala other than a generic preference for declarative over OO and a dislike of the jvm

also procedural programming is good imo

death to state

kitten emergency fucked around with this message at 23:06 on Jul 9, 2016

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
that said you can use scala in an almost purely functional style so that's why I don't hate it

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i'm reading about vector graphics since i'm doing wireframe polygon stuff and lol

quote:

There are several methods for producing the clock rates we need. Atari used Binary Rate Multipliers (BRMs). A BRM is a counter that divides the input clock by a digital number. Although the pulses it produces are not guaranteed to be evenly distributed through the counting cycle they will be close enough for our purpose.

The BRM used by Atari was the 7497. The 7497 is a 6-bit BRM. With a digital input of 63, it will produce 63 output pulses for every 64 input clocks. With a digital input of 1 it will produce one output pulse every 64 input clocks. Two 7497s were chained together to produce a 12-bit BRM. The data sheet for the 7497 is available here (PDF 282KB).

Part way through the run of Asteroids, we used up the world's supply of 7497s and Texas Instruments (the only manufacturer of 7497s) did not have them on their schedule to make more for several months. Rather than shut down the production of Asteroids, Howard Delman designed a daughter board with small-scale ICs to replace the 7497s. A new layout for the Asteroids PCB was also done using the new circuitry.

triple sulk
Sep 17, 2014



fritz posted:

sulk did scala in a previous job and hated it

scala is piss

that said it has a lot of capabilities as a language as gonadic io said, but the level of disparity in code complexity can be very great. i don't see much reason in using it over java 8 or maybe even clojure if you had the option because scala's tooling is awful.

jony neuemonic
Nov 13, 2009

i've never written scala professionally, it seems like if a team is using it strictly as a nicer java it'd be okay but if they're trying to take advantage of the entire kitchen sink it hands you it'd be horrifying. y/n?

Bloody
Mar 3, 2013

scala might be good if you're using it as jvm-haskell. scala is probably bad if you're using it as java++

brap
Aug 23, 2004

Grimey Drawer
so you're basically saying that if you don't use it for anything real, it'll be fine?

Adbot
ADBOT LOVES YOU

VikingofRock
Aug 24, 2008




"my use case is the only real use case"

  • Locked thread