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
cinci zoo sniper
Mar 15, 2013




Luigi Thirty posted:

I got to listen to someone in the next cube over bitch all day about how it would make his job (remote support) easier if our application just used reversible password encryption
:suicide:

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

raminasi posted:

I write plugins for a 3D modeler. explain why letting a dumb bug crash the whole modeler and losing my user's work is preferable to emitting an error message and aborting.

Because if your dumbshit plugin is throwing an exception that it doesn't know how to handle locally, it's probably already hosed up the user's work. And unless you have a guaranteed safe rollback available, loudly failing is preferable to introducing silent corruption that the user might not notice until it's far too late to correct.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
RPC over HTTP

raminasi
Jan 25, 2005

a last drink with no ice

Jabor posted:

Because if your dumbshit plugin is throwing an exception that it doesn't know how to handle locally, it's probably already hosed up the user's work

this isn't true at all, though. the overwhelmingly common workflow is "user pushes button -> plugin crunches some numbers -> plugin updates in-memory document with results of number crunching." if an exception gets thrown during number crunching, then i can either tell the user "uh apparently that button doesn't work right now, you should probably email us about this" or just blow everything up around them, and i know which one my users prefer. (is it possible that an unanticipated exception indicates unexpected and incorrect mutation? sure. but in all the bugs i've found and fixed here, i can't think of a single one of those.)

and i still haven't heard any explanation for who's supposed to be handling the unhandled exception if i can't do it. how do you even write a crash handler without being able to catch arbitrary exceptions? you've gotta get the stack trace from somewhere!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i am working on a go thing and i needed to store some common sql queries so i made a crappy cache object that i just passed around between things. then i realized it should probably be threadsafe so i added some thread safety and now i have basically rolled my own cache.

anyhow, i'm not a total idiot so my conclusion is "i guess i need a cache" so I googled for the most popular go in-app cache thing and it has almost exactly the same api as the one i stupidly put together over the last day or two. like i will just have to change a few things.

sometimes it's nice to be reminded that maybe i do know what i'm doing

HoboMan
Nov 4, 2010

so what's this scala i've been hearing so much about? looks like them trying to make something to ween java devs off oop into a more functional mindset?

anyways it looks cool, can anyone recommend a tutorial? or preferably like a course or something

Bloody
Mar 3, 2013

scala is the java open beta

brap
Aug 23, 2004

Grimey Drawer

MALE SHOEGAZE posted:

i am working on a go thing

maybe i do know what i'm doing

nope

cinci zoo sniper
Mar 15, 2013




MALE SHOEGAZE posted:

i am working on a go thing and i needed to store some common sql queries so i made a crappy cache object that i just passed around between things. then i realized it should probably be threadsafe so i added some thread safety and now i have basically rolled my own cache.

anyhow, i'm not a total idiot so my conclusion is "i guess i need a cache" so I googled for the most popular go in-app cache thing and it has almost exactly the same api as the one i stupidly put together over the last day or two. like i will just have to change a few things.

sometimes it's nice to be reminded that maybe i do know what i'm doing
wrong thread

Let me tell you about my triple for loops recombining complex numbers

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
can someone tell me how the heck to deploy an asp.net core app to windows server 2008 / iis 7.5

it runs fine on linux but i have no idea how to get this thing working on windows. come on microsoft

cinci zoo sniper
Mar 15, 2013




Asymmetrikon posted:

can someone tell me how the heck to deploy an asp.net core app to windows server 2008 / iis 7.5

it runs fine on linux but i have no idea how to get this thing working on windows. come on microsoft
*somewhere in maine*
"my people need me, " Shaggar mutters, rolling in bed

HoboMan
Nov 4, 2010

Just deploy straight to the cloud with Microsoft Azure™

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

HoboMan posted:

well turns out i'm even dumber than i thought

you're not dumb if you don't understand abstractions by reading about them without actually using them imo

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

fart simpson posted:

you're not dumb if you don't understand abstractions by reading about them without actually using them imo

agreed. this is why programming education is generally heavier on project work than lectures. i learned way more from implementing various abstractions badly over and over before getting a working program than from a week of lectures on, say, log-structured file systems.

tef
May 30, 2004

-> some l-system crap ->

fart simpson posted:

you're not dumb if you don't understand abstractions by reading about them without actually using them imo

it was a hasty explanation and i cut a lot of things out too with a made up syntax too

for me it was hacking together arrows that made it click

but tbh a lot of this functional stuff is just design patterns but coming from a completely different programming style

this may or may not help https://vimeo.com/98922027 as it contains erik meijer

tef
May 30, 2004

-> some l-system crap ->
the whole Contravariance is the Dual of Covariance Implies Iterable is the Dual of Observable bit is :2bong: but neat as heck

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


HoboMan posted:

so what's this scala i've been hearing so much about? looks like them trying to make something to ween java devs off oop into a more functional mindset?

anyways it looks cool, can anyone recommend a tutorial? or preferably like a course or something

a new scala course is starting on coursera in 5 days so lucky you: https://www.coursera.org/learn/progfun1

scala isn't really to wean java devs off OOP, in reality it's an exploration of how tightly integrated oop and fp concepts can be intertwined

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Condiv posted:

a new scala course is starting on coursera in 5 days so lucky you: https://www.coursera.org/learn/progfun1

scala isn't really to wean java devs off OOP, in reality it's an exploration of how tightly integrated oop and fp concepts can be intertwined

its also bad

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


fart simpson posted:

its also bad

nah, scala is good

tef
May 30, 2004

-> some l-system crap ->

Condiv posted:

nah, scala is good

things i hear about scala is that the performance overhead for some of the features it introduces come at such a cost at runtime (slow or unpredictable performance), that as you write scala in production it starts to resemble java. one with a nicer syntax i'm told, even if you do get quite close to java. the random bits bolted onto java are starting to lower the burden of writing in java now too.

let's not talk about sbt this is a polite conversation

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Share Bear posted:

java [...] dependencies [...] logging

in my experience: DEHUMANIZE YOURSELF AND FACE TO BLOODSHED

Soricidus
Oct 21, 2010
freedom-hating statist shill
instead of scala, use java 8 with lombok. there, now you have the good parts without any of the flaming garbage heap scala buries them in

9-Volt Assault
Jan 27, 2007

Beter twee tetten in de hand dan tien op de vlucht.

Condiv posted:

scala isn't really to wean java devs off OOP, in reality it's an exploration of how tightly integrated oop and fp concepts can be intertwined

You should use C# and F# for this. F# is really really nice.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Charlie Mopps posted:

You should use C# and F# for this. F# is really really nice.

f# without the manual declaration/file order micromanagement bullshit would basically be the perfect pl

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Charlie Mopps posted:

You should use C# and F# for this. F# is really really nice.

mono and the c# thing ms released for linux are quite slow compared to java, so a jvm language is what I use. if i ever did use mono i'd code in f# if i could though.

gonadic io
Feb 16, 2011

>>=

Soricidus posted:

f# without the manual declaration/file order micromanagement bullshit would basically be the perfect pl

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
most of the scala love I see around here is for akka

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


uncurable mlady posted:

most of the scala love I see around here is for akka

I been using rxjava/rxscala in a project recently

it's pretty cool

NihilCredo
Jun 6, 2011

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

Soricidus posted:

f# without the manual declaration/file order micromanagement bullshit would basically be the perfect pl

I strongly disagree, but you'll be happy to hear the language design team has decided to throw a bone to spaghetti lovers

https://github.com/fsharp/FSharpLangDesign/blob/master/RFCs/FS-1009-mutually-referential-types-and-modules-single-scope.md

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

MALE SHOEGAZE posted:

i am working on a go thing and i needed to store some common sql queries so i made a crappy cache object that i just passed around between things. then i realized it should probably be threadsafe so i added some thread safety and now i have basically rolled my own cache.

anyhow, i'm not a total idiot so my conclusion is "i guess i need a cache" so I googled for the most popular go in-app cache thing and it has almost exactly the same api as the one i stupidly put together over the last day or two. like i will just have to change a few things.

sometimes it's nice to be reminded that maybe i do know what i'm doing

or, and bear with me here, no one else knows what they're doing either

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Wheany posted:

in my experience: DEHUMANIZE YOURSELF AND FACE TO LOGBACK

more like dICK
Feb 15, 2010

This is inevitable.
Are there still any red hat employees in here

kugutsu
Dec 31, 2008

Soricidus posted:

instead of scala, use java 8 with lombok. there, now you have the good parts without any of the flaming garbage heap scala buries them in

still doesn't have pattern matching/partial functions, sum types, or typeclasses.

there are more things that might be more dubiously useful, but lack of pattern matching alone is a deal breaker for me, and as far as I know frege is the only other JVM language that has as good or better pattern matching than scala. frege will be a better choice than scala eventually but for now it's still in the 'its own compiler is the biggest thing written in it, still working on the standard library" stage.

lombok maybe gets Java 8 90% of the way to being kotlin

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

our logging configuration is broken again by ~~ something ~~

if i make a deliberate syntax error in logback.xml, mvn jetty:run will barf all over the console
if i leave logback.xml as it was, i get a nice log about it being discovered and logging being configured
the next output is
code:
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
and the next line after that is back to whatever is the default logging format in jetty

i think this is the 4th time i'm doing this during this project :suicide:
after i get it working, if anyone breaks the logging again, i will literally flay them

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


kugutsu posted:

still doesn't have pattern matching/partial functions, sum types, or typeclasses.

there are more things that might be more dubiously useful, but lack of pattern matching alone is a deal breaker for me, and as far as I know frege is the only other JVM language that has as good or better pattern matching than scala. frege will be a better choice than scala eventually but for now it's still in the 'its own compiler is the biggest thing written in it, still working on the standard library" stage.

lombok maybe gets Java 8 90% of the way to being kotlin

frege has an sbt plugin! https://github.com/earldouglas/sbt-frege

i'm getting an itch to try frege out

raminasi
Jan 25, 2005

a last drink with no ice

Soricidus posted:

f# without the manual declaration/file order micromanagement bullshit would basically be the perfect pl

:agreed:

Sapozhnik
Jan 2, 2005

Nap Ghost
in C:

why does char ** cast to void * but not to void **, that's kind of annoying.

is there some strict aliasing poo poo i'm supposed to be aware of

i mean, sure i can throw a (char **) cast in there but this probably throws a warning for a reason and i'd rather not be visited by the spooky scary ghost of undefined behaviour

quiggy
Aug 7, 2010

[in Russian] Oof.


Mr Dog posted:

in C:

why does char ** cast to void * but not to void **, that's kind of annoying.

is there some strict aliasing poo poo i'm supposed to be aware of

i mean, sure i can throw a (char **) cast in there but this probably throws a warning for a reason and i'd rather not be visited by the spooky scary ghost of undefined behaviour

char** is a pointer to a char*, void* is a pointer to Something. since a char* is Something, a char** is a void*

a void** meanwhile is a pointer to a void*, which char** is not

Star War Sex Parrot
Oct 2, 2003

void ** doesn't make much sense to me since I'm guessing that someone would try to use it to keep track of a 2d array. however, you can't do pointer arithmetic on void pointers which also means you can't index into this structure.

maybe i'm wrong on why the spec doesn't allow what you're trying, but that seems like a reasonable guess to me.

edit: ^^^ that makes more sense ^^^

Star War Sex Parrot fucked around with this message at 17:04 on Jun 2, 2016

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

no, I get it, every line of code in C++ is, basically, a monad. it takes all variables, functions, etc. visible in the scope as inputs, and copies them to outputs, possibly modifying them, sometimes introducing new variables, sometimes erasing them if it's the end of a scope. I remember this from my computer science fundamentals course, every line of code being a function over all the variables that returns all the variables, with modifications, was one of the things I remember the best, but could never find a practical use for

so I guess the "monadic" way to implement optional/nullable in C++ would be exceptions, which skip the "callback" (really a "callforward") and return the error value (the exception object, on the catch site). by making "monadicity" explicit you can do interesting things that normally require non-portable or privileged code, like scheduling/interleaving. I get it

thanks tef, it was enlightening. you should give yourself more credit

  • Locked thread