New around here? Register your SA Forums Account here!

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 $10! We charge money because it costs us money per month for bills alone, and since we don't believe in shady internet advertising, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Soricidus
Oct 20, 2010
freedom-hating statist shill
the exception to this rule is if you pick c++, because then the language and the problem are the same thing

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

DOES NOT OWN EXOTIC FISH

Soricidus posted:

the exception to this rule is if you pick c++, because then the language and the problem are the same thing

Except C++ is cool and good.

akadajet
Sep 14, 2003

ratbert90 posted:

Except C++ is cool and good.

you guys aren't making it sound like either of those things

Soricidus
Oct 20, 2010
freedom-hating statist shill

ratbert90 posted:

Except C++ is cool and good.

I didn’t say it wasn’t. just that people seem to approach c++ as a problem to solve (it’s not enough just to make it do thing, you have to make it do thing as elegantly as possible, and preferably at compile time)

Nomnom Cookie
Aug 30, 2009



Soricidus posted:

I didn’t say it wasn’t. just that people seem to approach c++ as a problem to solve (it’s not enough just to make it do thing, you have to make it do thing as elegantly as possible, and preferably at compile time)

paraphrasing hackbunny this is because if you don't do that you're just stuck using a language that's not fit for purpose. if not doing crazy template stuff is an option then why not use java or c and not have to deal with like copy constructors and member function pointers and somebody's lovely destructor throwing exceptions

Illusive Fuck Man
Jul 5, 2004

what a great country!
Taco Defender
because my brain is broken and I enjoy writing c++ for regular everyday tasks

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


Illusive gently caress Man posted:

because my brain is broken and I enjoy writing c++ for regular everyday tasks

:therapy:

Soricidus
Oct 20, 2010
freedom-hating statist shill

Illusive gently caress Man posted:

because my brain is broken and I enjoy writing c++ for regular everyday tasks

yeah this

please remember that the context of my comments is specifically picking a language for hobby projects. for real-world things you should make pragmatic decisions based on e.g. whether you do in fact have a business need to shave 16 bytes off every file object. but for hobby projects it should be based entirely on what you enjoy. if what you enjoy is figuring out how to make c++ do things in clever ways then it's a great choice. and if you don't, then you should pick a different language for your dumb spare time thing that nobody else will ever care about, because c++ will just get in your way and distract you from the bits you find enjoyable. if your hobby problem is one for which java is suitable, and java is the language you know best, then it might be a good choice even though it is not a fashionable language.

i hope these statements are entirely uncontroversial, peace

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
i mean unless you're doing hobby projects in PL/SQL in which case

what the gently caress

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.
I can’t wait for C++2x to have a standard package manager and build system that both require doing everything in C++ template metaprogramming

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





Cold on a Cob posted:

i mean unless you're doing hobby projects in PL/SQL in which case

what the gently caress

i wrote a rest api in 100% postgres for funsies

animist
Aug 28, 2018

the talent deficit posted:

i wrote a rest api in 100% postgres for funsies

:eyepop:

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

yeah I was thinking about doing something similar, all the pieces are there, I guess, and hey at least it's not Oracle lmbo

mystes
May 31, 2006

There's also PostgREST.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
NO POSTGRETS (POSTGRATS?)

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
if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

gonadic io
Feb 16, 2011

>>=
rust's proc_macro trip report: actually pretty good. they let you operate on streams of tokens like
code:
[
	Ident("foo"),
	Group(Brace, [
		Ident("bar"),
		Group(Paren, []),
		Punct(';'),
	]),
]
would be the code "foo{bar();}", then you transform that into whatever you want which then gets parsed by the compiler as normal.

i used it to kinda give rust named arguments:
code:
#[named_args]
fn foo(a: i32, b: u32) {
    println!("a: {}", a);
    println!("b: {}", b);
}

pub fn main() {
    foo(Args{a: -3, b: 4}); // you could remove the struct construction here with more macros
}


:q:

code is here but please don't judge me i should have slept hours ago and i hard-coded a bunch of poo poo instead of actually dealing with the complexity of real syntax

akadajet
Sep 14, 2003

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

you must be a joy to work with irl

brap
Aug 23, 2004

Grimey Drawer
Yeah after reading that I’m certain you haven’t been insulting anyone

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

nobody thinks you're insulting them or their tools, your posts are very interesting, and i almost always learn something from them. i think people are confusing your obviously superior technical knowledge on topics such as the windows api and c++ with recommendations to learn those specific technologies, which i would not wish on my worst enemy

akadajet
Sep 14, 2003

DELETE CASCADE posted:

nobody thinks you're insulting them or their tools, your posts are very interesting, and i almost always learn something from them. i think people are confusing your obviously superior technical knowledge on topics such as the windows api and c++ with recommendations to learn those specific technologies, which i would not wish on my worst enemy

lol stop stroking her ego so much

akadajet fucked around with this message at 01:19 on Dec 11, 2018

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

akadajet posted:

lol stop stroking his ego so much

seriously though he she does legitimately know what he's she's talking about, and i enjoy his her posts from a perspective of "wow ughghghg better you than me i guess"

VV o rly my bad

brap
Aug 23, 2004

Grimey Drawer
her

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 8 years!)

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

funny how "better at programming" always really means "more like the kind of programmer i am"

Nomnom Cookie
Aug 30, 2009



i kinda felt insulted but also had it coming so 🤷

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


let's steer this topic of conversation towards something more wholesome

Boy if there's one thing I love it's random drops of win32 API trivia

Main Paineframe
Oct 27, 2010

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

the thing is that i never want to get better at the kind of programming i actually do for my job, because that's the poo poo i already slog through all day long. if i'm going to do something with my spare time besides play video games, i want it to be new and interesting. also, maybe i'll learn enough that i won't have to be a fuckin Javascript jockey my whole life

that's why i spent half the day yesterday buried in 6502 manuals trying to learn assembly language via NES homebrew

Nomnom Cookie
Aug 30, 2009



Beamed posted:

let's steer this topic of conversation towards something more wholesome

Boy if there's one thing I love it's random drops of win32 API trivia

i too enjoy the writings of raymond chen. well except for the apologetics

bob dobbs is dead
Oct 8, 2017

Peeps are idiots, Leslie.
Nap Ghost
johan huizinga was the foremost scholar of play in the 20th century. it is difficult to define play but huizinga attempted 5 characteristics:

huizinga posted:

Play is free, is in fact freedom.
Play is not "ordinary" or "real" life.
Play is distinct from "ordinary" life both as to locality and duration.
Play creates order, is order. Play demands order absolute and supreme.
Play is connected with no material interest, and no profit can be gained from it

programming satisfies remarkably and perfectly all except the first and the fifth

redleader
Aug 18, 2005

Engage according to operational parameters

bob dobbs is dead posted:

johan huizinga was the foremost scholar of play in the 20th century. it is difficult to define play but huizinga attempted 5 characteristics:


programming satisfies remarkably and perfectly all except the first and the fifth

if you program in c++, you also get #1 and #5!

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
s/Play/lisp/g

AggressivelyStupid
Jan 9, 2012

ctps: just wrote like 10 visual studio snippets how have I lived this long without them

fritz
Jul 26, 2003

Kevin Mitnick P.E. posted:

if not doing crazy template stuff is an option then why not use java or c and not have to deal with like copy constructors and member function pointers and somebody's lovely destructor throwing exceptions

ideally the crazy template stuff is for someone else to have written and for me never to have to see

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

code:
\def\zzz@subdb@new@store@date#1#2{%
  \begingroup\edef\x{\endgroup\noexpand\pfgset{%
    /zzz/database/#1/#2/.code={%
      \noexpand\zzzParseDate{#1/#2}{\unexpanded{##1}}%
    }}}%
  \x%
}
fuckin expansion madness

jeffery
Jan 1, 2013
the system is gonna implode next year if naughtiliss goes without major price deflation asap

(USER WAS BANNED FOR THIS POST)

Soricidus
Oct 20, 2010
freedom-hating statist shill

Krankenstyle posted:

code:
\def\zzz@subdb@new@store@date#1#2{%
  \begingroup\edef\x{\endgroup\noexpand\pfgset{%
    /zzz/database/#1/#2/.code={%
      \noexpand\zzzParseDate{#1/#2}{\unexpanded{##1}}%
    }}}%
  \x%
}
fuckin expansion madness

dude please take this kind of thing to e/n

FlapYoJacks
Feb 12, 2009

DOES NOT OWN EXOTIC FISH

Krankenstyle posted:

code:

\def\zzz@subdb@new@store@date#1#2{%
  \begingroup\edef\x{\endgroup\noexpand\pfgset{%
    /zzz/database/#1/#2/.code={%
      \noexpand\zzzParseDate{#1/#2}{\unexpanded{##1}}%
    }}}%
  \x%
}

fuckin expansion madness

Sir, this is a Arby's drive through.

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.

gonadic io posted:

rust's proc_macro trip report: actually pretty good. they let you operate on streams of tokens like
code:
[
	Ident("foo"),
	Group(Brace, [
		Ident("bar"),
		Group(Paren, []),
		Punct(';'),
	]),
]
would be the code "foo{bar();}", then you transform that into whatever you want which then gets parsed by the compiler as normal.

i used it to kinda give rust named arguments:
code:
#[named_args]
fn foo(a: i32, b: u32) {
    println!("a: {}", a);
    println!("b: {}", b);
}

pub fn main() {
    foo(Args{a: -3, b: 4}); // you could remove the struct construction here with more macros
}


:q:

code is here but please don't judge me i should have slept hours ago and i hard-coded a bunch of poo poo instead of actually dealing with the complexity of real syntax

so they’ve kind of reinvented Dylan’s design for syntax-transforming macros in an Algol-like language

which, good for them, but there are solid reasons syntax-transforming macros are mostly used in languages with S-expression syntax

feedmegin
Jul 30, 2008

Soricidus posted:

there are basically two worthwhile options if you’re programming in your free time:

- play with fun languages
- play with fun problems

trying to do both at once is a recipe for never finishing a project so if you’re doing the second one then you’re best off choosing a language that you know well. no reason not to choose java if that fits the bill. it’s a good enough language, if a rather dull one, with a great ecosystem.

What if ur problem is wanting to design a fun language

Edit: what are those reasons?

Adbot
ADBOT LOVES YOU

Soricidus
Oct 20, 2010
freedom-hating statist shill

feedmegin posted:

What if ur problem is wanting to design a fun language

thats a pro tier choice for a hobby project. you can make all the same mistakes as everyone else and find out the hard way why all programming languages are bad!

you probably shouldn't use java for it though. antlr4 is really good for parsing but the java output basically forces you to use horrible visitor pattern poo poo and it's just not very fun. use an fp language with adts and pattern matching, it's p much what things like ml were designed for

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