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
Cybernetic Vermin
Apr 18, 2005

one thing i do know is that students hate learning obvious toys. this is the one angle that i actually like javascript from; sit them down in front of the ie11 they have installed anyway, have them go to the university homepage, hit f12, go to the console, and make some elements dance around with some tiny snippets. calculate the area of the logo. proceed to write a function or two. that kind of stuff

javascript is sort of poo poo though so i am not about to walk into the swamp of department politics to trial it ;q

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=
when I was a kid I messed around with logo and some flowchart-based logic thing

with actual programming I started with excel macro recorder which was my gateway into learning VBA.

Then at uni I did maths + compsci and on the cs side of things they taught Java and Haskell in first year.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

when i was 10 i wanted to learn C so i could write cool games like exile: escape from the pit. i got a book about C and read it but couldn't figure out how to get a C compiler. i bought a cd on ebay that i thought included a c compiler, but it turned out to be a collection of delphi & pascal code snippets

seiken
Feb 7, 2005

hah ha ha

MeramJert posted:

when i was 10 i wanted to learn C so i could write cool games like exile: escape from the pit. i got a book about C and read it but couldn't figure out how to get a C compiler. i bought a cd on ebay that i thought included a c compiler, but it turned out to be a collection of delphi & pascal code snippets

this is how you learn to program imo

suffix
Jul 27, 2013

Wheeee!
when i was idk 12 some friends of mine wanted to make games, so they got a big C++ book by bjarne stroustup from the library, and i think it scared them off programming for good

good for them

Soricidus
Oct 21, 2010
freedom-hating statist shill
lol if you learned to program

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
i learned to pogrom in the ukraine,

Tokamak
Dec 22, 2004

kraftwerk singles posted:

oh you hate that kids in school and a lot more people in general will be able to play with embedded devices?

is it horrible because there's one more layer of abstraction over the hundreds of layers you're already working over?

why not have an IDE that compiles your bespoke javascript/LOGO/Whatever directly into microcontroller code. maybe include an advanced mode that transpiles that code into C, so beginners can see how blink(Pin1, 250); looks like in "computer language". like the Arduino IDE... but with javascript.

suppose that, internet.connect(ip); would initialise the device and open a connection at the ip address. what is the difference if that were really just a C macro vs. intepreted javascript source code from the point of view of: a) a student and b) the device?

a) no difference, b) you can do more stuff because it executes quicker

it's horrible because you won't be able to do much more then blink 8 LED's before the javascript interpreter melts the solder.

kraftwerk singles posted:

javascript might not be the best but you really think basic is better?

as a kid who was first taught BASIC in junior highschool, then Visual Basic in senior highschool; Yes.

Notorious b.s.d.
Jan 25, 2003

by Reene
i learned trash eighty basic but at home my parents only had a pc

so my first language that i could really use was C. i dont recommend it

Notorious b.s.d.
Jan 25, 2003

by Reene

Mr Dog posted:

gotta love c# enums. "Hey let's have a strongly-typed enum facility in our language that actually isn't strongly typed at all fart fart fart fart"

(whereas java treats the possible values of enums as opaque global static instances of that enum type instead.)

AlsoD posted:

in Haskell enums are implemented in terms of ints and functions to convert back and forth between the enum and the int

idk if you'd consider that good or bad

all enum types are "bad" and inelegant. they make no sense as a core feature of a type system. but they help with a problem set that every programmer encounters on a regular basis

working, non-hacky* enums are a sign of a language that cares more about practical use than hypothetical elegance






* (p-langs that give us hashtables from string to int need not apply)

Bloody
Mar 3, 2013

i do my enums with #define

Sapozhnik
Jan 2, 2005

Nap Ghost

Notorious b.s.d. posted:

all enum types are "bad" and inelegant. they make no sense as a core feature of a type system. but they help with a problem set that every programmer encounters on a regular basis

working, non-hacky* enums are a sign of a language that cares more about practical use than hypothetical elegance






* (p-langs that give us hashtables from string to int need not apply)

Why? How else would you store a month, for instance?

Notorious b.s.d.
Jan 25, 2003

by Reene

Mr Dog posted:

Why? How else would you store a month, for instance?

if you implement months as a dumb enum you should be shot

i18n 101 itt

Notorious b.s.d.
Jan 25, 2003

by Reene
seriously though there are a ton of great use cases for enums but they don't really make sense as a fundamental type

including enums is a Good Sign in a language, someone somewhere actually tried to use it

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
But but my garden of pure ideology... :qq:

Nomnom Cookie
Aug 30, 2009



elegance isn't desirable as a goal for a programming language design. it doesn't improve usability. consistency, safety, simplicity, and expressiveness are much more important. a language that strikes a good balance between those factors is elegant. what people call elegance is often novelty, or simplicity taken to an extreme. concept languages

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

if you implement months as a dumb enum you should be shot

i18n 101 itt

unless your product is explicitly limited in its geographic scope, e.g. a govt website. i had to convince my boss that we didn't need a database table of US states.

Nomnom Cookie
Aug 30, 2009



Mr Dog posted:

Why? How else would you store a month, for instance?

however JodaTime wants. date/time code is just as easy to screw up as crypto.

don't write a datetime

emoji
Jun 4, 2004

Tokamak posted:

why not have an IDE that compiles your bespoke javascript/LOGO/Whatever directly into microcontroller code. maybe include an advanced mode that transpiles that code into C, so beginners can see how blink(Pin1, 250); looks like in "computer language". like the Arduino IDE... but with javascript.

suppose that, internet.connect(ip); would initialise the device and open a connection at the ip address. what is the difference if that were really just a C macro vs. intepreted javascript source code from the point of view of: a) a student and b) the device?

a) no difference, b) you can do more stuff because it executes quicker

it's horrible because you won't be able to do much more then blink 8 LED's before the javascript interpreter melts the solder.


as a kid who was first taught BASIC in junior highschool, then Visual Basic in senior highschool; Yes.

maybe i want to help ugandan kids with AIDS program embeddable devices in fay or clojurescript and get mad hn swagger

Tokamak
Dec 22, 2004

kraftwerk singles posted:

maybe i want to help ugandan kids with AIDS program embeddable devices in fay or clojurescript and get mad hn swagger

don't encourage me to drink myself to death.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

kraftwerk singles posted:

maybe i want to help ugandan kids with AIDS program embeddable devices in fay or clojurescript and get mad hn swagger

are you sam hyde

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
i wrote two sonic adventure trivia-based rpgs in mirc script and ran the bots for them on an irc server you could get to from the original dc game when i was 14

i learned a lot about terrible languages and software back then, but you know, mirc was surprisingly stable, i think i had to reboot windows more frequently than the two or three bots i ran crashed

i was crashing programs on a c64 when i was like two tho, i don't remember when i learned basic because 10 PRINT "HELLO" 20 GOTO 10 and "lO "$",8" seem like my native language

my first memory of actually doing something programming-related was patching a broken piece of software when i was about 9 i think?

i was using bbses when i was six tho, and i recall being at bbs meet-ups earlier than that

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Dessert Rose posted:

i wrote two sonic adventure trivia-based rpgs in mirc script and ran the bots for them on an irc server you could get to from the original dc game when i was 14

i learned a lot about terrible languages and software back then, but you know, mirc was surprisingly stable, i think i had to reboot windows more frequently than the two or three bots i ran crashed

i was crashing programs on a c64 when i was like two tho, i don't remember when i learned basic because 10 PRINT "HELLO" 20 GOTO 10 and "lO "$",8" seem like my native language

my first memory of actually doing something programming-related was patching a broken piece of software when i was about 9 i think?

i was using bbses when i was six tho, and i recall being at bbs meet-ups earlier than that

https://www.youtube.com/watch?v=43GChXc6RVY

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Kevin Mitnick P.E. posted:

elegance isn't desirable as a goal for a programming language design. it doesn't improve usability. consistency, safety, simplicity, and expressiveness are much more important. a language that strikes a good balance between those factors is elegant. what people call elegance is often novelty, or simplicity taken to an extreme. concept languages

brainfuck is elegant in a way

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

dont post my childhood

emoji
Jun 4, 2004
code:
so tessel
so servo-pca9685 as thing

port is plz tessel.port with 'A'

servos is plz thing.connect with port

very degrees is 0

such movement
  plz servos.moveServo with 1, degrees& 
  rly degrees is 0
    degrees is 180
  but 
    degrees is 0
  wow
wow

plz setInterval with movement, 500&

duck.exe
Apr 14, 2012

Nap Ghost
my "Programming Language Concepts" professor is teaching us agda, a functional language even more useless than the haskell it's built on. on a recent student eval form he actually asked "should this class switch to haskell in the future?"

:wtc:

duck.exe fucked around with this message at 07:39 on Mar 11, 2014

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i assume you mean "useless" instead of "unless", in which case i will say that haskell is cool & useful

motedek
Oct 9, 2012

DukeDuke posted:

my "Programming Language Concepts" professor is teaching us agda, a functional language even more useless than the haskell it's built on. on a recent student eval form he actually asked "should this class switch to haskell in the future?"

:wtc:

sounds like a pretty cool professor

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

DukeDuke posted:

my "Programming Language Concepts" professor is teaching us agda, a functional language even more useless than the haskell it's built on. on a recent student eval form he actually asked "should this class switch to haskell in the future?"

:wtc:

it's a "Programming Language Concepts" class. how much use the language gets in ~the real world~ is irrelevant, what matters is its ability to demonstrate language features. and if you want to demonstrate the power of dependent types, Agda is one of only a handful of possible options.

having said that im surprised the class works in only one language, because itd be as educational to look at bad language design as good language design.

coffeetable fucked around with this message at 10:43 on Mar 11, 2014

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
t

coffeetable posted:

it's a "Programming Language Concepts" class. ho.

having said that im surprised the class works in only one language, because itd be as educational to look at bad language design as good language design.

most colleges already teach c tho

Nomnom Cookie
Aug 30, 2009



Dessert Rose posted:

brainfuck is elegant in a way

so's your face

Bloody
Mar 3, 2013

coffeetable posted:

having said that im surprised the class works in only one language, because itd be as educational to look at bad language design as good language design.

i really dont think they should teach php in colleges

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
code:
$ c++filt __ZThn760_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize
non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)
code:
$ c++filt __ZThn792_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize
non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)
gently caress you C++ language

__ZThn760_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize

gently caress

__ZThn792_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize

youuu

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

hackbunny posted:

code:
$ c++filt __ZThn760_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize
non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)
code:
$ c++filt __ZThn792_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize
non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)
gently caress you C++ language

__ZThn760_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize

gently caress

__ZThn792_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize

youuu

dont use wxwidgets

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Notorious b.s.d. posted:

seriously though there are a ton of great use cases for enums but they don't really make sense as a fundamental type

including enums is a Good Sign in a language, someone somewhere actually tried to use it

enums are just a sum type with only nullary constructors, all the languages with enums are just _so close_ to getting it

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
my favorite thing to do in java is shove a shitload of code into enums, its like having a list of functions :v:

havelock
Jan 20, 2004

IGNORE ME
Soiled Meat
C# enums accept arbitrary ints for versioning reasons. Sum types force you to handle all cases at compile time, enums (in C# anyway) explicitly don't. As long as you have a default: in your case statement then you're fine.

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

Malcolm XML posted:

dont use wxwidgets

not my fault, was just doing an OSX build of Password Safe

issue went away, it was probably due to compiling wxWidgets with gcc and the application with llvm, which possibly resulted in mismatched object layouts between app and library, which conceivably could result in different this-adjusting thunks (whose names inexplicably all demangle to the same string regardless of adjustment offset. cmon even Microsoft got it right)

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

hackbunny posted:

Microsoft got it right

never surprising

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