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
Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



2 month anniversary on contacting some researchers about an article they wrote & the software they said would be made available :woop:

the professor keeps saying itll be ready "next week" and the students are silent as the grave when he CCs them lol

good thing its not business critical for us but just a cool thing we wanna try out

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



CRIP EATIN BREAD posted:

never use javascript

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



jit bull transpile posted:

comparable is an interface for classes to implement to allow them to be compared. in Java compareTo returns an integer. less than 0 means "sorts first" 0 means they're the same, and greater than 0 means "sorts after".

when the comparison is just a numeric field on the class people usually implement it as "return thing1.num -thing2.num"

in more complex scenarios you might instead use if then chains to return +-1 or 0.

for the former it'd be nice to just have a way to flag the field that needs to be compared instead of having to implement the same thing all the time.

why the heclk wouldnt you return self.num.compareTo(other.num)

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



lmao i got the code form the academic paper after literally 3 months of emailing them reminders

i forgot how bad academic code is:
- only works in one specific snowflake os configuration
- crashes randomly due to missing files
- virtually no points of customization or extension
- global variables galore
- lots of spaghetti

all in all its real shoddy code, just pure crap.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

oh cool our offshore team are publishing at last

there was a script missing, so i wrote to ask them about it and i was told "oh that one is still in progress, here follows a manual procedure that i did some weeks ago" and its a page of words but i tried to suss it out & wrote a script that did it in like 30 lines of python and it works with the next script

so im like, that cant be it? youve been doing that poo poo manually for weeks?!

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic io posted:

send it to them and blow their loving minds


and then get queries from them asking you to support it for the next 20 years

lmao

im gonna do that once i know what license their code is under and what my boss will allow (hes probably on board, he literally asked if we could put any of my stuff on github the other day)

well see what they reply in 2-3 months time

Carthag Tuek fucked around with this message at 20:20 on Nov 16, 2018

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



VikingofRock posted:

Probably this translates to "we've been using writing this script as a way to onboard an undergrad"

i guess thats ok. from looking them up, a bunch of them are linguists

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



i mean sure, they were too busy to emaiil the files for 3 months after their paper said they would be ready, so it kinda figures lol

e: actually the paper was 8 months old when i first emailed them lmao

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



mystes posted:

I think a decade ago there was some sort of software created as part of academic research somewhere that looked really cool that I kept hoping they would release, but after saying they would release it eventually for several *years* the people who made it just gave up and said they had decided that it was impossible (despite the software apparently functioning fine on their systems).

I think one of the problems was that it was written in smalltalk or something so they inevitably rewrote a lot of built in functionality until their software was incompatible with a normal environment (for some reason it seems like smalltalk or smalltalk derivatives like squeak not only allow but actually encourage this?).

I can't remember exactly what the program was, but the software itself was the point of the research, so it was pretty weird. It wasn't like software for performing calculations in a physical science field where it was created as an incidental part of the research and/or releasing it would allow people to check their work, showing that they screwed up their calculations and their research would have to be retracted, so they didn't really have any particular incentive to not release it, they just hadn't bothered to think about developing it in a way where it could be redistributed when creating the software (of course this makes you wonder if they could even reinstall it if their hard disk crashed or something).

in my experience its 50/50 "aaaa conference deadline!! gently caress everything as long as this piece of poo poo works" + "ew this code is gross, lemme clean it up real quick before releasing"

still no excuse for using global variables at the onset tho

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



AggressivelyStupid posted:

I have a broken brain, I read this and my first reaction was "this sounds like an interesting 'refactoring' project" :negative:

ive already started lol, i cant help myself

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




:awesomelon:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



in 05 i interned at an sf company for i think 500 a week

decided not to pay taxes cause gently caress america

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



im older now, and no longer cheat on my taxes

i also will not work in america to pay for their horrors

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



hahahha barf --- check this poo poo out:

code:
# variables to track - see output file for interpretation
vs = [0]*35
:catstare:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



CRIP EATIN BREAD posted:

does that make a 35 element array?

yes it does, literally the rest of the code is like vs[24] += 1

actually sorry i mean vs[24] = vs[24] + 1

cinci zoo sniper posted:

hahaha you’d need to deliberately write it this way. wonder what is the first language with this syntactical thing

i first saw that syntax this week lol so its not in basic :shrug:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic io posted:

I bet that author is frustrated that the language doesn't have support for other variable names, but they do what they can to work around the limitation

guess how "vs" ends up being used:

160 lines of print-statements that are identical except for which vs value is inserted

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



mystes posted:

Was this code written by a decompiler?

no lol afaik theyre just nerds who arent programmers and they have no requirements re maintenance or support or readability. like their reqs are just "did it work when we tried" and it did work for them, i think, probably

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



debug logging is fine

logging in itself is fine, the more the better imo

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



somewhere in the previous thread i wrote up a shaggarscript parser

"java good python bad" is i thnk +1

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



here we go:

Python code:
import sys, re

DEBUG = False

data = None

if len(sys.argv) > 2:
	data = sys.argv[1:]
elif len(sys.argv) > 1:
	f = open(sys.argv[1])
	data = f.read().split()
else:
	print 'usage: shaggarscript.py [tokens | file]'
	exit()

register = 0
stack = []

def pop():
	if DEBUG: sys.stderr.write('pop\n')
	global register
	register = stack.pop()

def push():
	if DEBUG: sys.stderr.write('push\n')
	global register
	stack.append(register)

def inc():
	if DEBUG: sys.stderr.write('inc\n')
	global register
	register += 1

def dec():
	if DEBUG: sys.stderr.write('dec\n')
	global register
	register -= 1

def add():
	if DEBUG: sys.stderr.write('add\n')
	global register
	register += stack[-1]

def sub():
	if DEBUG: sys.stderr.write('sub\n')
	global register
	register -= stack[-1]

def out():
	if DEBUG: sys.stderr.write('out\n')
	sys.stdout.write(chr(register))

instruction_map = {
	'python': pop,
	'java': push,
	'good': inc,
	'bad': dec,
	'lol': add,
	'idiot': sub,
	'language': out
}

for token in data:
	token = re.sub(r'\W+', '', token)
	if DEBUG: sys.stderr.write('%s %s %s\n' % (stack, register, token))
	if instruction_map.has_key(token):
		instruction_map[token]()
		if DEBUG: sys.stderr.write('=> %s %s\n' % (stack, register))
	else:
		if DEBUG: sys.stderr.write('nop\n')
	if DEBUG: sys.stderr.write('---\n')
python shaggarscript.py java good java lol java lol java lol java lol java lol java lol java is good. few languages are good good good good good good good good good good. java is a good language. unlike python, its a really good good good good language. not a bad bad bad language. python is so bad bad bad bad bad bad bad bad. really bad bad bad bad bad bad... few things are as bad. so, so bad bad bad bad bad bad bad. bad bad bad bad bad bad bad bad. a bad language. python? python is poo poo. python is not good. not a good language.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



:hai: double future java lol bad

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



cinci zoo sniper posted:

cjs: diagraming in TikZ

lol

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



eschaton posted:

if your HTML doesn’t represent hypertext documents where the semantics are straightforward and the styling is purely an aesthetic matter, then what you’re doing should not involve HTML, you should write a native app

:hai:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Achmed Jones posted:

:same:

every time I end up with an injury that requires them I’m a liiiiiittle bit excited

wtf "every time"??? it has literally never happened to me in almost 40 years on this cursed earth

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



dump database to text and use grep

then delete everything and quit your job

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



that reminds me, the other day i wanted to do some bulk editing of data in a third party app.

eventually settled on export xml > edit it > import xml again which worked well except all the object properties were like <property id="{uuid}">value</property> with the uuid<->property name mapping only defined in the xml header so i had to parse&build that in my script. whyyy :pwn:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



DaTroof posted:

you look like you know a lot about ignoring maxpermsize

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic jo denial

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

i can't charge my crystal if there's nobody else with me

so that is the two-handed technique. powerful. :hmmyes:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

:feelsgood:

edit: definitely compared to the German "broken" style

all man bracing

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

i thought that was with some sort of multithreaded jo loop?

java.awt.HeadlessException

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




oh man that reminds me of that game developer brøderbund.

i used to like playing Wings of Fury but then one of my friends said "propaganda piss" and i was like yea obviously and i kinda figured he had heard his dad say it or something. Anyway he's a racist now so :shrug:

also even though broderbund merely means brother-association, there is a fairly nazi odor about it
https://www.youtube.com/watch?v=YWsNqJ6YP88&t=115s

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Finster Dexter posted:

Whoa that's way better looking than the version I used to play on Apple IIc.

tbf the amiga1000 is like 4 years newer than the appleiic

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



yeh, as long as you didnt have the amiga with the bad ram lol

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



https://www.youtube.com/watch?v=vFh07lXfxTY

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



lmao try doing string manipulation in latex

youd thnnk that it would have some stuff built in, but not really. the best you get is like car/cdr and some lexical ordering that can be cobbled together for more userfriendly functions

or you could use any of a number of packages that may or may not break if used with other packages, who knows! :shrug:

Carthag Tuek fucked around with this message at 22:10 on Dec 5, 2018

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



redleader posted:

a laudable goal tbf

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



a factor of 2 in a 500 iteration loop is 1000x :shrug:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



haven't had my coffee yet lol

I meant this:

Xarn posted:

The way to 100x perf improvements usually consists of many smaller ones.

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Mahatma Goonsay posted:

Not when everything is written in mumps or worse.

i wonder what ))<>(( means in medical brainfuck

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