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
Nomnom Cookie
Aug 30, 2009



if u got a programming problem u cant fix with a hex dump and a slide rule then the problem is u

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
protip \d doesn't match -

tef
May 30, 2004

-> some l-system crap ->
https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/hJHCAaiL0so

quote:

Gofmt was written to reduce the number of pointless discussions about
code formatting. It succeeded admirably. I'm sad to say it had no
effect whatsoever on the number of pointless discussions about syntax
highlighting, or as I prefer to call it, spitzensparken
blinkelichtzen.

One step at a time.

Nomnom Cookie
Aug 30, 2009



colorforth is the answer

Nomnom Cookie
Aug 30, 2009



dont like the syntax highlighting, just rewrite your os and editor. its only 500 bytes anyway

FamDav
Mar 29, 2008
why are they talking about syntax highlighting in terms of colors when you want to talk about groups of lexemes. and isn't it basically

parens
keywords
numbers
strings
operators?

i guess you could split it into exposed identifiers vs internal, lol

qntm
Jun 17, 2009

FamDav posted:

why are they talking about syntax highlighting in terms of colors when you want to talk about groups of lexemes. and isn't it basically

parens
keywords
numbers
strings
operators?

i guess you could split it into exposed identifiers vs internal, lol

i believe syntax highlighting perl is turing-complete

certainly it's irritatingly difficult because a regex can be delimited with almost any character you want and the escaping rules inside it are different depending on the delimiter

uG
Apr 23, 2003

by Ralp
also if you use braces as the delimiter you close them s{burp}{fart}

uG
Apr 23, 2003

by Ralp
best practices BITCH

cliffy
Apr 12, 2002

uG posted:

best practices BITCH

thats what we call the sucker charged with enforcing our coding standards

Nomnom Cookie
Aug 30, 2009



qntm posted:

i believe syntax highlighting perl is turing-complete

certainly it's irritatingly difficult because a regex can be delimited with almost any character you want and the escaping rules inside it are different depending on the delimiter

perl can parse differently depending on BEGIN blocks. the one proof i've seen relied on conditionally defining a sub in a begin block. thats not so bad compared to c++. c++ is undecidable except that the standard requires compilers to limit template expansion depth. you have to either be ok with using ambiguous parses for syntax highlighting or you have to instrument the compiler

i think tef said a toy language is one where the most complex software written in the language is its compiler. c++ is a toy language

uG
Apr 23, 2003

by Ralp

qntm posted:

i believe syntax highlighting perl

X-BUM-RAIDER-X
May 7, 2008

Nomnom Cookie posted:

a toy language is one where the most complex software written in the language is its compiler.

ignoring the fact that 'toy language' isnt really even a defined thing, this statement is very wrong

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

OBAMA BIN LinkedIn posted:

ignoring the fact that 'toy language' isnt really even a defined thing, this statement is very wrong

good thing tef didn't actually say it!

tef posted:

a toy language: a language where the only substantial program written in it, is the compiler.

BONGHITZ
Jan 1, 1970

[citation needed]

opt
Oct 10, 2007
a toy language: all of them

Nomnom Cookie
Aug 30, 2009



PleasingFungus posted:

good thing tef didn't actually say it!

mines better

FamDav
Mar 29, 2008

Nomnom Cookie posted:

perl can parse differently depending on BEGIN blocks. the one proof i've seen relied on conditionally defining a sub in a begin block. thats not so bad compared to c++. c++ is undecidable except that the standard requires compilers to limit template expansion depth. you have to either be ok with using ambiguous parses for syntax highlighting or you have to instrument the compiler

i think tef said a toy language is one where the most complex software written in the language is its compiler. c++ is a toy language

template expansion has nothing to do with syntax highlighting. that just makes c++ compilation undecidable.

while c++ has some wonky context sensitive issues (object instantiation vs function declaration), there's really nothing worse about highlighting it than python or haskell.

also, what more do people want out of syntax highlighting?

Nomnom Cookie
Aug 30, 2009



FamDav posted:

template expansion has nothing to do with syntax highlighting. that just makes c++ compilation undecidable.

while c++ has some wonky context sensitive issues (object instantiation vs function declaration), there's really nothing worse about highlighting it than python or haskell.

idk if post about something that isnt java or linux its probably wrong

quote:

also, what more do people want out of syntax highlighting?

intellij highlights bad code, its not perfect but it catches a depressing %age of my employer's codebase

X-BUM-RAIDER-X
May 7, 2008

Nomnom Cookie posted:

idk if post about something that isnt java or linux its probably wrong


intellij highlights bad code, its not perfect but it catches a depressing %age of my employer's codebase

pretty sure 95% of syntax highlighting is just regex of keywords anyway

X-BUM-RAIDER-X
May 7, 2008
can we not sperg too much about why c++ is or isnt a bad language as i think we all agree that c++ isn't well designed but nonetheless its still p.much the most important and practical language that currently exists

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

OBAMA BIN LinkedIn posted:

can we not sperg too much about why c++ is or isnt a bad language as i think we all agree that c++ isn't well designed but nonetheless its still p.much the most important and practical language that currently exists

no that's C

MeruFM
Jul 27, 2010

OBAMA BIN LinkedIn posted:

can we not sperg too much about why c++ is or isnt a bad language as i think we all agree that c++ isn't well designed but nonetheless its still p.much the most important and practical language that currently exists

C++ hits the market that needs to be fast with the trade-off of being either super expensive or buggy. OSes for the former, games for the latter.

uG
Apr 23, 2003

by Ralp

Nomnom Cookie
Aug 30, 2009



OBAMA BIN LinkedIn posted:

can we not sperg too much about why c++ is or isnt a bad language as i think we all agree that c++ isn't well designed but nonetheless its still p.much the most important and practical language that currently exists

i can agree that p much every opinion you have is wrong

Papes
Apr 13, 2010

There's always something at the bottom of the bag.
So I'm a terrible programmer whose only done academia stuff so I have little knowledge about how "real" programs work.

I'm trying to put together a very simple shipment notification app for the iPhone. I've dug through the APIs of the major parcel carriers and I believe I just need to make a XML parser class (I'd use a library one obviously) and then receive and send messages to their respective websites through the XML parser?

Is this basically the gist of what I should do, or is there a way thats 10x easier that I don't know about.

Nomnom Cookie
Aug 30, 2009



Papes posted:

So I'm a terrible programmer whose only done academia stuff so I have little knowledge about how "real" programs work.

I'm trying to put together a very simple shipment notification app for the iPhone. I've dug through the APIs of the major parcel carriers and I believe I just need to make a XML parser class (I'd use a library one obviously) and then receive and send messages to their respective websites through the XML parser?

Is this basically the gist of what I should do, or is there a way thats 10x easier that I don't know about.

1. receive messages
2. send messages
3. parse XML

separation of concerns. read up on SOLID

then implement something with terrible design. if u can tell that ur doing something bad thats good enough for a babby dev. u get better with practice but u DONT get better from reading a text on UML and making diagrams for a month

Papes
Apr 13, 2010

There's always something at the bottom of the bag.

Nomnom Cookie posted:

1. receive messages
2. send messages
3. parse XML

separation of concerns. read up on SOLID

then implement something with terrible design. if u can tell that ur doing something bad thats good enough for a babby dev. u get better with practice but u DONT get better from reading a text on UML and making diagrams for a month

Alright sweet thanks, just wanted to make sure I was at least kind of on the right track.

landofcake
May 7, 2009

CANNONBALL TAFFY O' JONES!!!
I am shite at Ada, some planes going to fall apart ... we're in trouble guy

zokie
Feb 13, 2006

Out of many, Sweden
Also, you probably don't need to write your own xml-parser.

cowboy beepboop
Feb 24, 2001

zokie posted:

Also, you probably don't need to write your own xml-parser.

do it in regex ftw

NOTinuyasha
Oct 17, 2006

 
The Great Twist

Papes posted:

So I'm a terrible programmer whose only done academia stuff so I have little knowledge about how "real" programs work.

I'm trying to put together a very simple shipment notification app for the iPhone. I've dug through the APIs of the major parcel carriers and I believe I just need to make a XML parser class (I'd use a library one obviously) and then receive and send messages to their respective websites through the XML parser?

Is this basically the gist of what I should do, or is there a way thats 10x easier that I don't know about.

would you say the time & money you spent learning "academia stuff" was worth it at all

Zlodo
Nov 25, 2006

MeruFM posted:

C++ hits the market that needs to be fast with the trade-off of being either super expensive or buggy. OSes for the former, games for the latter.
games aren't buggy because c++, games are buggy because bad project management, lack of formalized development methods, over compressed development schedules or a combination thereof

and when you get lucky to work at a game studio with none of those problems it owns

but given that most bugs found in games happen at a high level (things like broken transitions between states, or errors caused by level layout changes and such) and not specific to the way things are some in c++ you'd have games just as buggy if they were written in a diff language like java or c# or whatever else really

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

my stepdads beer posted:

do it in regex ftw

ban

Squinty Applebottom
Jan 1, 2013

just dump into into your sql server do and some CHARINDEX(LEFT(REPLACE(REVERSE(config_dump),4),2))

easy peasy

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

polpotpi posted:

just dump into into your sql server do and some CHARINDEX(LEFT(REPLACE(REVERSE(config_dump),4),2))

easy peasy

smdh if your SQL server doesn't have an XML column type and unctions to parse it

Squinty Applebottom
Jan 1, 2013

Cocoa Crispies posted:

smdh if your SQL server doesn't have an XML column type and unctions to parse it

of course it does. i use the best of breed microsoft sql server 2012

why would you use xml datatypes tho? if certain operations are faster/easier with string parsing using xml is worthless

X-BUM-RAIDER-X
May 7, 2008
use SOAP

ure welcome

Bloody
Mar 3, 2013

use a lang with xml literals like scala thank me later

Adbot
ADBOT LOVES YOU

X-BUM-RAIDER-X
May 7, 2008
if ure looking for a standardised way of passing messages between things in a fun and user friendly xml type fashion and you're not using soap then welp

  • Locked thread