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
tef
May 30, 2004

-> some l-system crap ->

ahhh spiders posted:

lua has those and it makes zero difference at all unless you're a big baby

lua has 1.0 based arrays :q:

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

Otto Skorzeny posted:

it has 1.0 "based" hash tables; there is no array type

actually in lua parlance, they're called tablesand they're part hash, part array :q: (in 5.0+)

http://www.jucs.org/jucs_11_7/the_implementation_of_lua/jucs_11_7_1159_1176_defigueiredo.pdf

tef
May 30, 2004

-> some l-system crap ->

homercles posted:

in perl you can configure the base index to be any positive number

perl superiority

you can do this in visual basic
using dim http://msdn.microsoft.com/en-us/library/aa243352(v=vs.60).aspx

tef
May 30, 2004

-> some l-system crap ->

Rufo posted:

stop it your making perl sound poo poo

perl's great


quote:

To reanimate the program, its parse tree must be reconstructed. This phase exists only if code generation occurred and you chose to generate bytecode. Perl must first reconstitute its parse trees from that bytecode sequence before the program can run. Perl does not run directly from the bytecodes; that would be slow.

tef
May 30, 2004

-> some l-system crap ->
seriously programming perl owns

quote:

Basically, it's easier to run an economy where you assume everyone owns what they own, rather than assuming that everyone owns everything. Not that people aren't expected to share in a capitalist economy, or peculate[1] in a communist economy. These things tend toward the middle. Socialism happens. But with large groups of people, sharing everything by default only works when you have a "head chef" with a big meat cleaver who thinks he owns everything.

[1] peculate: v.i., to swipe the People's Property from the commons in the middle of the night; to embezzle from the public something that is not necessarily money (~L. peculiar, "not common"), cf embrace, extend, GPL.

Of course, the actual government of any computer is run by that fascist dictator known as the operating system. But a wise dictator knows when to let the people think they're capitalists--and when to let them think they're communists.

tef
May 30, 2004

-> some l-system crap ->

Janin posted:

dynamic typing, weak typing, no integers, hash tables as the primary abstraction

it's great if your alternative is Tcl or something, but programming has seen a few advances in the last 20 years and Lua hasn't adopted any of them.

ephemerons

tef
May 30, 2004

-> some l-system crap ->

tef posted:

ephemerons

to elaborate, this came out in 97 and it is in lua 5.2. :smugdog:

tef
May 30, 2004

-> some l-system crap ->
don't blame you, they're terrible.

tef
May 30, 2004

-> some l-system crap ->

Gazpacho posted:

i suppose if you wants to write actual programs in 100% continuation passing style by hand that's the language to do it in

node.js

tef
May 30, 2004

-> some l-system crap ->
why not learn postscript instead of forth rotor

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

the subject really isnt open for debate. its fine. end of story.

tef
May 30, 2004

-> some l-system crap ->
Rasmus :allears:

tef
May 30, 2004

-> some l-system crap ->
OH poo poo I'VE BEEN SHAGGARED

tef
May 30, 2004

-> some l-system crap ->
they should have been using opera

tef
May 30, 2004

-> some l-system crap ->

Char posted:

tef's flapping his gums

I don't even have any machines that can run IE9


I'm totally freaking out :ohdear:

tef
May 30, 2004

-> some l-system crap ->
obviously what I need to do is find out who bought me it and buy them my old av

tef
May 30, 2004

-> some l-system crap ->

Werthog posted:

the punchline is that this man is now my boss

http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare

tef
May 30, 2004

-> some l-system crap ->
p.s. I am yet to use anything I picked up from a cs course, in my day job of programming

tef
May 30, 2004

-> some l-system crap ->
ugh shaggar av

tef
May 30, 2004

-> some l-system crap ->

tinselt0wn posted:

lol tef youve never taken a cs course

I've failed more cs courses than you've had empty quotes

tef
May 30, 2004

-> some l-system crap ->

Lysidas posted:

ugh fine

Stringer.java:
code:
public class Stringer
{
	public static void main(String[] args)
	{
		String s = "";
		for (int i = 0; i < 100; i++)
		{
			s += i;
		}
		System.out.println(s);
	}
}
code:
$ javac Stringer.java
$ javap -c Stringer
Compiled from "Stringer.java"
public class Stringer {
  public Stringer();
    Code:
       0: aload_0       
       1: invokespecial #1                  // Method java/lang/Object."<init>":()V
       4: return        

  public static void main(java.lang.String[]);
    Code:
       0: ldc           #2                  // String 
       2: astore_1      
       3: iconst_0      
       4: istore_2      
       5: iload_2       
       6: bipush        100
       8: if_icmpge     36
      11: new           #3                  // class java/lang/StringBuilder
      14: dup           
      15: invokespecial #4                  // Method java/lang/StringBuilder."<init>":()V
      18: aload_1       
      19: invokevirtual #5                  // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      22: iload_2       
      23: invokevirtual #6                  // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      26: invokevirtual #7                  // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      29: astore_1      
      30: iinc          2, 1
      33: goto          5
      36: getstatic     #8                  // Field java/lang/System.out:Ljava/io/PrintStream;
      39: aload_1       
      40: invokevirtual #9                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V
      43: return        
}
$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

if you're wondering, much of hotspot's optimiser, is dedicated to making up for programmers not understanding java

tef
May 30, 2004

-> some l-system crap ->

JawnV6 posted:

i feel like i should read higher order perl but i mash text around just fine w/ perl right now

a good book.

tef
May 30, 2004

-> some l-system crap ->

Hammerite posted:

oh. i assumed it would be something more interesting than that. idk why you'd care much about that

it's a little more annoying than that

python strings act like lists, that contain lists, etc. there is no notion of a character. the problem is telling a list of things and a string apart becomes awkward.

you'll have hit this when you've passed some arg "foo" instead of ("foo",)

it causes some other issues, for some reason, python lacks a flatten operator (guido :argh:), and so everyone ends up rewriting it in their own unique way: for example

code:
def flatten(input):
    out = []
    try:
        for x in input:
            out.extend(flatten(x))
    except StandardError, e:
        out.append(input)
    return out


print flatten([1,[2,3],4])
print flatten("abc")
flatten "abc" shouldn't work but it does because you hit the recursion limit :q:

aside: array indexing on strings isn't a good idea when you actually use unicode rather than the sticking your fingers in your ears *la la la* everything is ascii *la la la nonsense*

tef
May 30, 2004

-> some l-system crap ->

Hammerite posted:

Why? because combining characters?

that and variable width encodings. unless you use utf-32 to store strings, you will have to deal with variable width encodings in utf-8 or utf-16 (surrogate pairs). being able to leap n chars into a string without scanning is a holdover from ascii.

tef
May 30, 2004

-> some l-system crap ->

Lysidas posted:

really tef? invalid syntax in your example code?

eat it python-3 havers

tef
May 30, 2004

-> some l-system crap ->

Hammerite posted:

But what's the problem with array indexing of strings if you index codepoints or characters rather than bytes?

tef posted:

that and variable width encodings. unless you use utf-32 to store strings,

KARMA! posted:

not if the internal representation is utf 32!! :q:


basically you have to use 4 bytes for each character. it's expensive.


quote:

(Characters to avoid the combining characters thing.) The language should be able to do that surely.

combining characters are different from variable width encodings, that's a whole separate issue altogether. :q:

tef
May 30, 2004

-> some l-system crap ->
from dive into mark (rip)


I was walking across a bridge one day, and I saw a man standing on the edge, about to jump off. So I ran over and said, “Stop! Don’t do it!”

“I can’t help it,” he cried. “I’ve lost my will to live.”

“What do you do for a living?” I asked.

He said, “I create web services specifications.”

“Me too!” I said. “Do you use REST web services or SOAP web services?”

He said, “REST web services.”

“Me too!” I said. “Do you use text-based XML or binary XML?”

He said, “Text-based XML.”

“Me too!” I said. “Do you use XML 1.0 or XML 1.1?”

He said, “XML 1.0.”

“Me too!” I said. “Do you use UTF-8 or UTF-16?”

He said, “UTF-8.”

“Me too!” I said. “Do you use Unicode Normalization Form C or Unicode Normalization Form KC?”

He said, “Unicode Normalization Form KC.”

“Die, heretic scum!” I shouted, and I pushed him over the edge.

tef
May 30, 2004

-> some l-system crap ->

Hammerite posted:

with the variable width thing, you're saying: you either have to store in utf-32 (expensive in terms of memory), or scan through the string to find the offset (expensive in terms of computation).

yup. utf-32 is quite expensive in terms of memory. utf-8 is what a large proportion of documents are serialised in

quote:

I'm saying I'm fine with that, gimme my array indexing.

fwiw, when I read at an offset, i'm likely scanning the string in the first place.

(regarding python, It is more I don't think "foo"[1] should be valid, because strings don't provide list semantics or list performance in python, guido :argh:).


quote:

as regards normalisation forms and all that, I have to concede I don't know enough to have an opinion.

enjoy http://www.unicode.org/reports/tr15/ :catdrugs:

tef
May 30, 2004

-> some l-system crap ->

Markov Chain Chomp posted:

i dont care about characters for some weirdo in cambodia hth

racist

tef
May 30, 2004

-> some l-system crap ->

quote:

still usin CVS crew checkin in

colour me unsurprised.

quote:

occasionally people talk about moving to git but after 12+ years with a bulletproof workflow, why

atomic commits would be nice, eh

tef
May 30, 2004

-> some l-system crap ->

CaptainMeatpants posted:

guys if need to make a web api that will be used by a website and phones what should i use

i don't care about being a big restful knob-slobber, query strings are fine

in 'hypermedia/rest' urls are opaque. I guess you must be talking about shaggar/rest.

tef
May 30, 2004

-> some l-system crap ->

Internaut! posted:

wait til you crack a history book someday

well, I can just wait for you to post more about your exciting development environment. but given cvs is relatively new (only a year older than python), I don't think you get to whine about 'how it was' back in the days before structured programming.

let alone when people wrote things like ratfor, or people argued about the utility of if statements.

quote:

and discover people were successfully developing software all the way back in the 20th century before stuff like git and svn were invented

yup and people still write code as if the last 20 years never happened too.

we've been trying to drag luddites like you away from punchcards and fortran to no avail.

in the end, you'll die and then progress can happen.

tef
May 30, 2004

-> some l-system crap ->

Internaut! posted:

wait til you crack a history book someday

I'm tempted to rebut this by posting my collection of old computer books (I have a few), but you're really not worth it. Even though I like posting books.

Your haughty condescending tone carries an arrogance that can only come from a stubborn refusal to learn from the mistakes of others. You're no worse than the zealots you decry and defame, the key difference being which side of the false dichotomy you sit: 'new' vs 'old'.

tef
May 30, 2004

-> some l-system crap ->
I'm saying you are a bad person. pee pee, doo doo, and all that.

tef
May 30, 2004

-> some l-system crap ->

MononcQc posted:

idgi

perl :v:

tef
May 30, 2004

-> some l-system crap ->

Internaut! posted:

that developers with grad degrees in hard sciences in environments like wall street use proven, efficient, fast old tools and technologies because we aren't clever or industrious enough to pick up the latest fotm

and not because we can literally measure the impact to our profits when our trade data falls out of byte alignment in memory for example

hey shaggar pay attention this is how you do it.

tef
May 30, 2004

-> some l-system crap ->
for the record I think it is fine to use new technologies like, java, xml and svn. I don't see your problem with 'modern stuff'

tef
May 30, 2004

-> some l-system crap ->
nerds

tef
May 30, 2004

-> some l-system crap ->

Werthog posted:

also please get a new avatar already, why do you still have that anime poo poo

I was thinking of getting a new avatar but I am growing attached to this one

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
also nerds are terrible and I hate programming

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