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
Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

abraham linksys posted:

i wish i had the drive to just write code for no reason like some people

i have to really want to make something, i guess. like i learned js when i wanted to make a chrome app and i learned python when i wanted to make a quick web site with django

i got all into emberjs when i wanted to make a sweet modal note-taking app that was like vim crossed with outlining but i never got emberjs to work right and it sapped all of my energy :smith:

maybe i should go back and try to make it with backbone or somethin

no. stop it. stop it stop it stop it. :sotw: stop loving doing this you loving idiot

Adbot
ADBOT LOVES YOU

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

people have made good suggestions to you in this very thread but without fail you have ignored them and come back whining. i'm calling you a loving idiot not because you lack skills or ideas (both of which i am guilty of too!!) but because you're the most stubborn person i've come across in yospos and you refuse to learn. believe it or not i'm actually trying to help you even if i call you names. i'm legit mad irl that you keep doing this to yourself and you need to either stop it or get out. note that this is one of the longest and most time consuming posts i have made

okay so back to your q

abraham linksys posted:

maybe i should go back and try to make it with backbone or somethin
no. see my point about you reinventing hello world in yet another flavour of the month web framework, like you always loving do

Milkie Galore posted:

you seem to be forever writing hello world 10 different ways or in 10 different languages. do something that actually challenges you and you might not feel so miserable about your achievements.

abraham linksys posted:

[...] i haven't coded anything in like a month and don't have any original ideas so i might as well try a new language or something
NO

look its not just me saying this:

trex eaterofcadrs posted:

mr. volcano: how about instead of focusing on something as fleeting as language du jour, you actually learn something rewarding like the fundamentals of computing?

Jonny 290 posted:

yeah anal volcano you have a laundry list of joke toy languages there, i recommend getting solid in at least one IT pillar language so that you can use that as justification to get a job in which you can leverage all your joke toy languages on side projects etc etc

tef posted:

you're well on your way to craftmanship by repeating the same loving thing over and over.
remember that jonny has been in the same boat as you but he didnt gently caress up

abraham linksys posted:

i need to learn how to program good
then you need to stop doing things that you can already do. it will not improve your ability to program well. you are wasting time and effort and you will be no better off and will inevitably come back here complaining

ok heres another idea you had

abraham linksys posted:

my friend's family is opening a hookah bar soon, im hoping to convince them to let me make their website
don't do this. you can already do lovely little websites. this one wont be any different. youre wasting your energy.

similarly,

abraham linksys posted:

man i need to be coding something because if i dont code things i will never learn to code things better
this is somewhere between "wrong" and "only half the story". coding 24/7 will not make you code better because you are not challenging yourself.

ok summary so far:
- do not learn any more loving javascript web frameworks
- do not rewrite anything you have made already
- do not beg people to let you do lovely work you can already do

ok so what should you do then???

abraham linksys posted:

i know rotor said i should "learn basic theory" and the other recommendation is "learn a c# or java" but i only learn by doing and i need to do something :ohdear:
yes it can seem a bit like a catch 22 if you dont like reading theory! if you dont know anything about cs, you dont know any of the neat things that can be done, and they dont spring to mind when youre busy doing something else + make you think "i wonder if i could use that to do X". the more theory you know, the more neat things youll spot that you can explore.

abraham linksys posted:

thinking about coding something in Go
im reluctant to recommend go because nobody really uses it. however it does have a pretty cool concurrency paradigm if learning about concurrent programming sounds fun. personally id leave it till later. however

tef posted:

write a boids style flocking simulator, using one goroutine per boid :3:
this sounds kinda fun!

what are some interesting things you've been thinking about recently? e.g. i like to listen to dj mixes and i think it's cool how tracks can be blended together. i wondered about how you might measure the melodic similarity/"distance" between two tracks using a vector space model like in computational linguistics. i've spent a few hours on and off exploring this idea and none of it required me to code anything!! it was cool. maybe ill code something up one day

what kind of things are you interested in? maybe i can recommend some high-level areas of cs you could read about to spark your imagination.

you shouldnt be choosing projects based on your current skills. "what can i do with node.js" isnt going to get you anywhere. find things that interest you in other domains and use your arsenal of computing knowledge to approach them. the chances are that someone's done something similar already which you can read about or play with!

Rufus Ping fucked around with this message at 21:30 on Sep 19, 2012

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

tef posted:

holy loving poo poo even rufo is effort posting.

dear musicians lounge, long time reader first time writer, ive been playing "chopsticks" on piano for 4 years now, am i best trying it on a hammond organ or harpsichord next, cheers

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
hello, me again, i couldnt think of any other songs and i dont find the footpedals on a church organ very interesting so im learning this new thing called a "bontempi" instead, its cool cos you can only depress one note at once, thanks for nothing shitlords

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

ZYNGA STOCK CRASHER posted:

now using it in another course where our first problem set was tons of applications for social networks. shits tite

vaguely related

http://en.wikipedia.org/wiki/Friendship_paradox

neat but pretty obvious if you think about it

the applications wrt disease are cool

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Paracetamol Boy posted:

for some programming comp we had a maths and graph theory guy, a combinatorics and dp guy, general purpose coding guy and uh team strategist

the ideas guy

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
i did some python today after doing clojure for a couple of months and its rly fuckin ugly omg :pwn:

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
git from the rear end up

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

abraham linksys posted:

got inspired by that "xkcd style graphs" for mathematica post on the top of HN and decided to try to implement it in d3js



it works but the code is very ugly. but hey, so is all my code when i'm first learnin something, in this case d3js and svg stuff

its here: http://bl.ocks.org/3815828

parkinsons.js

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
gimme the first or last item from this list. no i dont care waht it is

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

abraham linksys posted:



i can't even begin to envision how it actually works

so try to work it out.

you're not going to learn anything if your reaction to something you don't already understand is "i dont understand that!!!!!! better not tax myself by actually trying to figure it out"

start with the parametric way to draw a circle: x=r cos(t) and y=r sin(t)
(recall that cos is just sin but 90 deg out of phase) and build it up from there

note that you can use different r vals in each if you want to draw an ellipse
or e.g. double up the t value inside one of the sins if you want a figure of 8
or knock one of them out of phase if you want to pinch the thing diagonally
or dampen the thing (recall the shape of e^-x as x increases) if you want it to die down as t increases

i suggest working with a simpler pair:
x(t) = A1 * cos(f1 t + p1) * e-d1t
y(t) = A2 * sin(f2 t + p2) * e-d2t

start with p1=p2=0 and d1=d2=0 and play with A1 and A2 and f1 and f2

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Zombywuf posted:

Multiple Selections - what a stunningly complicated way to do search and replace.

your an idiot. cheers

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

tef posted:

call-cc

yes it does, in clojure.algo.monads

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

WHOIS John Galt posted:

the goroutines+channels seem really cool but i can't figure out why i'd use them, especially when it seems like so much poo poo goes wrong in concurrent programming

concurrent programming introduces a whole load of new considerations and possible pitfalls but using a language with decent high level concurrency primitives ameliorates that somewhat

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
idk its like if you always want to ride a pushbike thats fine but if you want to drive a car you should def get one with at least 3 wheels and working brakes, car anal ogy

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
it wouldnt be particularly difficult to transform an occam program into something fdr2 can understand

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Shaggar posted:

can you even do transactions w/ scrub-tier fake (non-relational) databases?

not sure what the purpose of transactions would be in a k-v store

do you mean to avoid r-w/w-w conflicts or what

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

TONSIL HOCKEY posted:

I don't spawn threads that depend on another threads operation/result

that is just silly

embarrassingly so

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

0xB16B00B5 posted:

opinionated, but blunt and honest. I like it.

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
my tank is fight, my bat is spring, verify me

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Rap Game Forum Mod posted:

our true names revelead :staredog:

Rap Game Forum Mod

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
java 7 added support for named groups in regexes e.g.

(?<foo>\w+)(?<bar>\d+)

is there some way to get the names of all the groups from a Matcher object if i dont know them in advance?

(like how i can get all the values of the groups by calling group(i) for 0<i<=groupCount() )

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
i mean preferably without doing somematcher.pattern.toString() and using... a regex... to find chevron-enclosed names lol

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Shaggar posted:

java regex protip. group(0) always refers to the entire matched string. group(1) is the first one, and the last one is groupcount()+1. its loving stupid but thats the way it works.

the last one is groupcount(), note that i used <= not <

Shaggar posted:

tbh theres probably a way better way to do what u want tho.

dynamic regex group naming smells of p-language hackery.

i dont think there really is unfortunately, other than insisting the user uses numbers rather than names

vapid cutlery posted:

basically anything that's not compile-time checked like using strings for poo poo is the worst

i hope you're at least burying this regex inside some class with a simple external API

yeah as best i can/need to. its a peculiar one, its user-supplied but at compile time (its part of a parser generator)

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
ah i saw that private map but didn't know there was a way to get at it, thanks homercles!

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
also brb throwing up

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Nomnom Cookie posted:

Using user-supplied regexes opens you to a complexity DoS

yes - though the user in this case is another coder, using [the output of] my code in theirs (think antlr,yacc,sablecc etc) so it doesnt really matter and theyre unlikely to do this to themselves and its not my problem if they do

its not like im running a website where ppl can type an arbitrary regex in a box dont worry

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
holy poo poo CoC still exists

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

rotor posted:

I liked teletypes, seeing the screen typed out every time really made you think about what you were doing.

suffering is character building :eng99:

i really dont think your combination of rose tinted nostalgia and thinly veiled hatred for learners makes for a constructive course on learning. i learned despite these things, not because of them. please dont confuse your misanthropy for insight into education

youre basically advocating abuse. i hope no-one ever has to suffer under you as a teacher, and that you lose your hands in a industrial accident, so that you never inflict your ignorance upon the keyboard again

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
you see, kids today learn to cycle easy. they have training wheels, safety helmets. in my day they learned to cycle on penny-farthings, and thats the best way to learn to cycle. i havent moved on since 1890, so why should i let them take advantage of progress - i certainly havent

people should learn from my mistakes by repeating them exactly, because my mistakes have been refined and polished over the years

who wants to learn javascript? making simple things that they can share easily and show to others? they should be learning to program in my home-brew hello world environment. what do you mean you want to do something fun? i never got to do that. i spent the first five years writing guessing games


i hope you drown in your own bile

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
well played

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

tef posted:

yeah, but it's more effort

code:
import operator

operators = { 
    '|': operator.or_,
    '&': operator.and_,
}

def booleval(expr):
    nums, ops = [], []

    while expr:
        a, expr = expr[0], expr[1:]

        if a in "10":
            nums.append(int(a))
        elif a in "(":
            num, expr = booleval(expr)
            nums.append(num)

        while ops and len(nums) >= 2:
            nums, args, op = nums[:-2], nums[-2:], ops.pop()
            val = operators[op](*args)
            nums.append(val)

        if a in "&|":
            ops.append(a)
        elif a == ")":
            break
    return nums[0], expr 

wouldnt a shift reduce be slightly neater

code:
stack=[]
while(cur = shift(tokens))
{
	stack.push(cur)

	while(true)
	{
		[a,b,c] = pop top 3 items off stack

		if (c == "(" && a == ")")
			stack.push(b)
		elseif (b == "&" && a != "(")
			stack.push(a & c)
		elseif (b == "|" && a != "(")
			stack.push(a | c)
		else break
	}
}
return stack.pop

Rufus Ping fucked around with this message at 01:41 on Oct 22, 2012

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
regexes

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

wolffenstein posted:

Learnable Programming by Bret Victor

How to make programming learnable with examples and Shaggar-esqe opinions.

bret victor has a breathtakingly inflated opinion of his own importance and it bothers me slightly that people let him get away with it

the guy gave an hour long speech earlier this year in which he demonstrated some example programs hes written. this comprised half an hour of casually-scripted pseudo-spontaneous "oh i wonder what would happen if" moments designed to make using his software appear effortless and intuitive, followed by half an hour of thoughtfully spewing platitudes in order to elevate his computer programs into a fully fledged philosophy for living one's life

not content with this, he then, from his newly-erected visionary podium, without so much as a whiff of self awareness, compares himself to tesla and englebert, and suggests his personal life philosophy (wanting to improve software usability) is like 19th century feminist elizabeth cady stanton's desire to overcome social injustice



the mans a loving intellectual fraud and i wish people would stop cleaning his anus out with their tongues

Rufus Ping fucked around with this message at 01:22 on Oct 23, 2012

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

rotor posted:

literaly a door-to-door mongo salesman

mongosteen

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
lein is ftw

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Jonny 290 posted:

well idk the exact term in this context but i was twiddling the clock dividers for PWM on the arduino last night

code:

Setting 	Divisor 	Frequency
0x01 	 	1 	 	31250
0x02 	 	8 	 	3906.25
0x03  		64 	 	488.28125
0x04  		256 	 	122.0703125
0x05 	 	1024 	 	30.517578125

TCCR1B = TCCR1B & 0b11111000 | <setting>;

code:
Speed   Sample rate**  Speed   Sample rate**
 5        50000         4        40000
 6        62500         3        32000
 7        78125         2        25600
 8       ~97656*        1        20480
 9      ~122070*        0        16384
10      ~152588*       -1       ~13107*
11      ~190735*       -2       ~10486*


Table footnotes:
* Since sample rates are restricted to integers only, these have been rounded to the nearest integer.
** Sample rate is based on 50,000 Hz being the true speed, not the usual 44,100 used with audio CD's.

Adbot
ADBOT LOVES YOU

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
ssj4

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