« first day (1500 days earlier)      last day (3481 days later) » 

3:22 AM
@CharlesE.Grant tons of other languages are linkable from C -> Haskell's FFI is meant explicitly to link with C and Haskell has many template engines. Furthmore, it's C -> Just make it spit to STDOUT and you can pipe it to anything, Python is commonly used for patching stuff onto the STDOUT like that
^-- CPython accessible C templating engines
I guess what I'm trying to say is, don't lock yourself in a single language unless you like to make your life harder and your solutions worse.
 
user55340
3:46 AM
Whee! (and back from La Crosse)
 
user55340
and then don't miss trulia.com/local/san-francisco-ca/tiles:1|points:1_crime - check out that little bit of color just north of the airport.
 
The first real use of his book being in either case is downright incorrect. Chris Okasaki's thesis was published long before either of those languages were developed, and studied closely by programmers across a great variety of functional languages such as Haskell, the MLs (all examples in the thesis are in Haskell and SML), surely CLISP coders, Erlang, and any other language you can figure has an interest in referential transparency (COQ, HOL, Miranda, Clean, and on and on..) There's much to learn from software languages of the past, don't assume only recent languages were well thought out. — Jimmy Hoffa 29 secs ago
 
user20683
@JimmyHoffa Given how many people stop at the static vs dynamic holy war and don't pay any attention beyond that, I'm unsurprised.
 
"Indeed, one of my major complaints about the computer field is that whereas Newton could say, "If I have seen a little farther than others, it is because I have stood on the shoulders of giants," I am forced to say, "Today we stand on each other's feet." Perhaps the central problem we face in all of computer science is how we are to get to the situation where we build on top of the work of others rather than redoing so much of it in a trivially different way." - Richard Hamming, 1968 Turing Award lecture, Journal of the ACM 16 (1), January 1969, p.7 — Jimmy Hoffa 17 secs ago
People in our industry are so focused on the future they rarely realize what can be gained by looking to our past...
 
user20683
I guarantee you that a very large portion of devs have no idea who Richard Hamming is
 
user20683
4:15 AM
despite the fact that his work is critically important to video compression amongst other things
 
@WorldEngineer including me. I've heard that quote and had to google it to stop myself from misattributing it to Dijkstra.
There's more we could all know
 
user20683
@JimmyHoffa I know him from Hamming Distance
 
@JimmyHoffa "don't assume only recent languages were well thought out" -- I would suggest an alternate wording: "don't assume recent languages where well thought out." — MichaelT 3 mins ago
Just had to toss that in here to hold the typo for posterity.
;)
 
user55340
@JimmyHoffa I was trying to get a strikethrough in there.
 
user55340
I wanted it to say "don't assume only recent languages where well thought out." - but strikethrough doesn't work in comments.
 
user20683
4:27 AM
don't assume languages were thought out at all. My programming languages professor (the same King of King's C Programming: a Modern Approach) was on the Modula 3 committee and likes to tell stories about committee designed languages in general
 
user55340
I'll point again to the "designed languages are the ones people hate" quote...
 
user55340
btw, @JimmyHoffa you might want to poke at edx.org/course/delftx/… (or poke people to poke at it). Auditing it is free.
 
user55340
> This course will use Haskell as the medium for understanding the basic principles of functional programming. While the specific language isn't all that important, Haskell is a pure functional language so it is entirely appropriate for learning the essential ingredients of programming using mathematical functions. It is also a relatively small language, and hence it should be easy for you to get up to speed with Haskell.
 
user55340
Aug 28 at 21:02, by MichaelT
> Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp. — Paul Graham
 
user20683
Haskell is relatively small compared to Ruby or C++
 
user20683
4:31 AM
@MichaelT Ada's actually pretty well designed
 
user55340
I doubt people writing C, Perl, Smalltalk, or lisp were sitting down with a data structures book and saying "aah, we'll do such and such"
 
user55340
They were instead sitting down and saying "I want it to do such and such" and then figuring out how to solve the problem.
 
user55340
@Shog9 oh yea... the reading list in my profile: programmers.stackexchange.com/users/40980/michaelt
 
user20683
@MichaelT one that I keep meaning to get to is Apprenticeship Patterns
 
user55340
@WorldEngineer That one looks good.
 
user55340
 
user55340
 
user20683
@MichaelT Are you familiar with Heinlein's specialization is for insects quote? I kind of want to make a programming version
 
user55340
 
user55340
I was trying to find the version from the Notebook that was similarly illustrated.
 
user15026
4:55 AM
I agree with the sentiment, but not the statement as it stands
 
6:13 AM
@MichaelT shit that class has to be awesome - you see who's teaching it? Lucky students.
I somewhat agree @Ashley it strikes me as a bit macho and arrogant the way it reads, but the sentiment is good
 
user55340
@JimmyHoffa auditing it is free... Watching the lectures costs nothing.
 
user55340
@AshleyNunn consider it in the perspective of an author speaking through a scifi character.
 
1:26 PM
@MichaelT might give some of them a look - I've seen a hand full of Erik Meijer's presentations on Level 9 and such, he's a pretty great presenter, smiles too much to be confused for a real software engineer
 
1:41 PM
*Channel9
 
1:56 PM
Hello guys
 
2:07 PM
Hello @Кристиян, I suppose you're here because of your “Choosing a language” question. The answer to that usually depends on a lot of details, for example: “What features are important to me in a language?”, “What language do I get paid for?”, “Where is my code supposed to run?”, and “What am I already familiar with?”.
 
2:59 PM
Yes. I already know a little bit of java. My target is web and mobile development, but am wondering what to choose :(
 
user55340
3:24 PM
@КристиянКацаров Java is quite prevalent in the web.
 
3:37 PM
@MichaelT so are C# and Ruby and JavaScript. Not to mention PHP.
 
user55340
@amon Its more a "if you know java, you already have a web appropriate language"
 
The problem is that users need to have java installed...
 
user55340
@КристиянКацаров For the web, the app server is running java - not the end user. No more than the end user needs php installed.
 
3:55 PM
@КристиянКацаров whenever I see a foreignly spelled name with such a normal pronunciation from another culture, I have to wonder, is Russia not your original country, or is your name common over there and I just don't know it? It's such a common english name, I would think it's not common in Russia
I wonder about that when I see last names too like how so many people migrate from one country to the another historically their last names would often be changed by the country they moved to, to make them more natural or because they were hard to pronounce in that country etc, I used to work with a fellow named Zhiyuan that went by "Jerry" because nobody could say his name for instance
or oh, Berlin, were you born there and given a germanic name but of Russian heritage? Sorry if it's none of my business, I just think language stuff like roots of names and such are interesting
Like how the name Pablo, Paulo, Paul, Pavlov are all rooted together, but have a different pronunciation based on their country of origin - your names pronunciation doesn't strike me as Russian though you spelled it as a Russian/Slavic country would
 
4:15 PM
Cool, can you give me a demo of websites running java ? Thanks! Btw I have bulgarian name!
 
@КристиянКацаров Ah! Interesting! So that's a common pronunciation for Christian in Bulgaria then?
This is a comparison of notable web application frameworks. == General == Basic information about each framework. === ASP.NET === === C === === C++ === === ColdFusion Markup Language (CFML) === === Haskell === === Java === === JavaScript === === Scala === === Perl === === PHP === === Python === === Ruby === === Others === == Comparison of features == === C++ === === ColdFusion Markup Language (CFML) === === Java === === JavaScript === === Perl === === PHP === === Python === === Ruby === === Others === == See also == Comparison of free softw...
en.wikipedia.org/wiki/… <-- java specific web frameworks
I'm a .NET guy so I can't really help but @MichaelT has experience working in Java web frameworks, he could speak to what the commonly used ones are if you wish to go try and pick up one of them, I don't know what people use for that these days, I know there's a lot of them though, and have been for years. Many are going to be older so I don't know what the modernly used web frameworks are for Java
 
user55340
@КристиянКацаров w3techs.com/technologies/details/ws-tomcat/all/all --- ebay and linked in two name two quick ones running tomcat (a java application server)
 
user55340
There's also Jboss and (Oracle) BEA Weblogic.
 
user55340
Java is often found in more 'entprisey' environments that already have a product or in companies were the product isn't a web site itself. I can think of numerous websites backed by java.
 
4:38 PM
As a beginner what would you recommend me? Let's say I take the java side :) Unfortunately, my name doesn't have the meaning of Christian, but is similar.
Also, what about web hostings and tomcat, does every hosting have it? Or...
 
user55340
4:51 PM
@КристиянКацаров Java web hosting isn't as common as others and tends to be more expensive... but it exists. whoishostingthis.com/compare/java -- now, if you are thinking of some quick personal hosting type solutions, you might instead consider php which is more accessible... but its also a new language full of... lets be nice and call them 'quirks'
 
user55340
But running a tomcat server locally or if you are after career growth based on existing knowledge, Java works for that.
 
5:14 PM
I know php, javascript ... and now a little bit java... but am searching for a unique language that can handle everything ^_^ :)
 
Unique language...can handle everything...must...refrain...from...saying....
The term for a language that is designed to work for any given program is called a General Purpose Programming Language, there are many of them to choose from, and they are hardly unique. Java, C#, Python, C++, and Ruby are among the most commonly used General Purpose Programming Languages, any of them is a good place to start
People hold MANY opinions on which languages are good and for what (and which ones they hate) but if you just want to start somewhere, those are all valid choices. Alternatively if your goal is to learn all about software engineering and computing to become highly skilled rather than just highly employable I would suggest none of those is a good start
 
user55340
5:42 PM
Random site of interest (especially woodworkers - aka @GlenH7 @Ampt ): woodcutmaps.com
 
I'm thinking of carving some nice wood scales for this old ~1890s razor I got, the cellulose originals are super warped by now
 
user55340
6:00 PM
@JimmyHoffa You should go check out Chris Yates some time: chrisyates.net he's best known for his wooden puzzles... but he sometimes does other art projects too.
 
user55340
 
user55340
> His main obsession from 2001 - 2004, he says, was Terraforms, topographical maps made in a similar style to his puzzles. He still does them by commission, but his crowning piece was made in 2003: a scale model of the 20-mile radius around Aspen, Colorado made with just a Ryobi band saw, a project that he notes "probably drove (him) insane."
 
user55340
His puzzles though are... intense.
 
user55340
 
user55340
6:02 PM
That's the puzzle disassembled...
 
user55340
 
user55340
That is it completed.
 
6:21 PM
My goal is not to develop super good or difficult apps. I am more a business type person who just wants to realize his projects himself. And they are mostly web/mobile simple creative projects. That's why I am looking for a simple language that can give me somehow good performance. Though I know that the language is not everything, for example my programming logic is still really bad, but I am learning now.
 
@КристиянКацаров then stick with one of the languages I mentioned, Java, C#, Python, C++, or Ruby. C++ is a bit less so good on the web framework side though so you might toss that one out. If you already know Java and you just want to get your projects done, really there's no reason for you to look outside of Java. Java can do anything you could want to, it's a solid General Purpose Programming Language.
 
user55340
6:39 PM
@КристиянКацаров the reason I'm suggesting a dup on that question is there is a really good answer over there for it that I'd hesitate trying to redo in another place.
 
user55340
28
A: What is the proper way to do REST?

WilkWell, there are a lot of ways to learn how to build a RESTful web application and no, there isn't a unique right way. RESTful is not a standard but is uses a set of standards (HTTP, URI, Mime Type, ...). Start with this: How I Explained REST to my wife Then, proceed with this: RESTful Web Servi...

 
user55340
as an aside, depending on your application @КристиянКацаров you may find that a NoSQL database that also communicates via HTTP to be useful couchdb.apache.org
 
Hey thanks ! You are awesome guys! I love java, the only thing I don't like is that it requires the machine and is directly compiled :( This is somehow uncomfortable I think. What if i decide to write an OS for mp3 player ?
 
user55340
@КристиянКацаров If you get into systems programing, you will likely find yourself well within the grasp of C or C++. Those are the languages that are really designed to 'speak' to the hardware level moreso than other higher level languages.
 
user55340
Though, as Android showed us, creating another virtual machine and then sticking Java on it isn't an impossibility either.
 
7:09 PM
@КристиянКацаров I wouldn't worry about embedded at this point - to be certain when you're still early in your learning on this stuff, trying to focus on multiple very large and different disciplines like web dev and systems programming will just split your focus too much as there's so little crossover between them. Pick one, whichever you're more interested in, and use that to learn your way through systems design and implementation and all the tools and tricks therein.
It's true that with Java you can work with embedded and do systems programming as with C#, though C/C++ are better for it. That said, if you want to do systems programming more then skip Java and go straight to C/C++ and focus on doing embedded coding for a while. Just don't try to learn 2 disciplines at once, you'll only make both harder on yourself.
 
7:34 PM
Yeah that's a big problem of me. I still don't know what I want because of not understanding so much, at the end i am like a women being asked " which shoes do you want, red or black ? ", but at least I know I do this for business and I need to set my needs according to the market...
 
8:13 PM
@КристиянКацаров bit of a sexist comment...just sayin...
 
8:31 PM
don't think of it that negative :)
 
user55340
9:26 PM
 
9:41 PM
Is there a good way to parse a website and pull out information quickly?
 
@enderland I hear regexp is a great way to parse HTML
 
I have a wedding registry I want to basically parse to pull item name, quantity, and cost
and amazon doesn't have that "basic" feature available
and this seems like it should be really easy
@JimmyHoffa haahahah
 
@enderland you walked into it :P
@enderland honestly, parsing web pages is among the least easy things people have come up with
 
well it'd just be regex on the actual site text, not the source code
I don't think
 
you'll find no less standard set of documents then that categorized as "web pages"
 
9:43 PM
never occurred to me to check the page source (it's a weekend, leave me alone) :P
yeah the html is a complete mess
I could pull the item costs really easily
 
user55340
Generated source typically is... however, are they classes that make it distinct?
 
no, it's really crappy, quantity is separate from the costs
 
user55340
something like <div class="name">Robert</div> ...
 
I wish
there's an entire second section of the html just dealing with quantity
 
user55340
But, can you find all the quality sections 'easily'?
 
9:49 PM
sounds like a job for....PARSER COMBINATORS!! Oh wait, there's never a job for those because nobody ever uses them for anything
 
I can almost get it since they have a field which looks like
price.2.I1QIHKVFIJMFC2.1591451876.USD.15.1
which for everything that there is a cost for shows price/quantity
BUT anything which is part of the "universal registry" and doesn't have a price apparently fails this one :(
err, nevermind, that's the increment not the quantity. This feels so stupid, it'd be so easy to write a query to get this total :)
 
@enderland in all honesty your best bet may be to start looking at automated web testing tools - there are many built explicitly for the purpose of scraping web pages for information that give a tool to non-technical people to select the data on the screen they want it to record
or a more technical solution you could look at fiddler's extensions
such tools could make it easy for you to get data from a web page into variables and there's often extensions that allow you to script behaviours based on those - I've automated uploads in this way where I had to scrape nonces from the page to attach to the upload etc
 
It'd be a lot nicer if amazon's html wasn't awful, too....
I suppose I could parse for the item name/cost and then parse out the quantities, since they appear to be sequential
 
10:15 PM
Ah what the heck. I'm going to try using Python and this - stackoverflow.com/a/20046030/1048539
Be a good chance to play around anyways
 
user55340
10:38 PM
@enderland Many sites with a CMS of some sort backing them rarely produce human readable html.
 
ok I'm dumb with regex sometimes (all the time?)
I have a tag which looks like:
> <span class="wl-iter-heading">DESIRED</span><br/>1</label>
qtyRE = "DESIRED</span><br/>(.+?)</label>"
that regex doesn't seem to return the number from there - I'm not sure what I'm missing
ahh I was parsing an invalid link. durrrr
 
10:59 PM
posted on October 12, 2014

Gordon Plotkin is renowned for his groundbreaking contributions to programming language semantics, which have helped to shape the landscape of theoretical computer science, and which have im-pacted upon the design of programming languages and their verification technologies. The in-fluence of his pioneering work on logical frameworks pervades modern proof technologies. In addition, he has made

 
user55340
 
:D
 
user55340
@enderland Python?
 
user55340
And I'll point out it may be easier to grab the text, toss it to HTMLParser.py and have that pull things out of the DOM.
 
I'm doing regex! :P
html is different for "amazon items" and "external" items
which is only a biiiiiit obnoxious...
 
user55340
11:07 PM
The thing is you could do things like:
 
user55340
from HTMLParser import HTMLParser

# create a subclass and override the handler methods
class MyHTMLParser(HTMLParser):
    def handle_starttag(self, tag, attrs):
        print "Encountered a start tag:", tag
    def handle_endtag(self, tag):
        print "Encountered an end tag :", tag
    def handle_data(self, data):
        print "Encountered some data  :", data

# instantiate the parser and fed it some HTML
parser = MyHTMLParser()
parser.feed('<html><head><title>Test</title></head>'
            '<body><h1>Parse me!</h1></body></html>')
 
user55340
And then have it parse the text, identify the block with the wl-iter-heading and the data 'DESIRED' and then look at the next data block that it encounters.
 
You probably need complete tags though right?
amazon's are like 20 layers deep
 
user55340
You'd need the entire DOM...
 
user55340
but you don't care about most of it.
 
11:09 PM
Yeah, but... it'd be really awful finding it all considering how many layers deep within tables/etc everything kinda is (except when it's not)
 
user55340
But you don't care about it... its a tree. You just let the parser run until it finds the node you are interested in, and then spits out stuff for that subtree.
 
user55340
Toss this code in its direction and see what you get...
 
user55340
from HTMLParser import HTMLParser
from htmlentitydefs import name2codepoint

class MyHTMLParser(HTMLParser):
    def handle_starttag(self, tag, attrs):
        print "Start tag:", tag
        for attr in attrs:
            print "     attr:", attr
    def handle_endtag(self, tag):
        print "End tag  :", tag
    def handle_data(self, data):
        print "Data     :", data
    def handle_comment(self, data):
        print "Comment  :", data
    def handle_entityref(self, name):
        c = unichr(name2codepoint[name])
 
@MichaelT ooooh. I might try this, since it looks like my regex version works (minus the "Universal Registry Items" stuff)
 
user55340
If you're willing to go after some xpath stuff... you don't even need to write the parser.
 
user55340
11:14 PM
1
A: Printing the html from one page doen't show all the source page with python and urllib2

alecxeYou should use an html parser, like lxml or BeautifulSoup. Here's an example using lxml: parser = etree.HTMLParser() root = etree.fromstring(html, parser=parser) print root.xpath('//td[@class="a-text-right dp-new-col"]/a/span/text()')[0] prints: $25.00 Note, that the required tag and it's ...

 
oh wtf they have an entirely different setup for the html for the universal registry items
#notworthitfor 3/48 items
 
user55340
print root.xpath('//td[@class="a-text-right dp-new-col"]/a/span/text()')[0]
 
user55340
find the node that is a td, with a class of a-text-right dl-new-col, then has a child of 'a', then has a child of 'span'... and get the text for that span.
 
yeah that looks nice, xpath's are helpful
I just wish they had each item, cost, and name in the same html block
rather than broken into a big table with all teh items first, then the costs, etc
makes me super skeptical any parsing I do will line everything up right :\
 
user55340
... You are in the middle of an exam, Aren't you? — morgano 43 secs ago
 
11:19 PM
lol
I want to respond with an answer saying "you need to remove =>enter code here" as this is not valid java syntax
 

« first day (1500 days earlier)      last day (3481 days later) »