|
Sartak posted:It's prolog.
|
# ¿ Jul 8, 2009 21:44 |
|
|
# ¿ May 15, 2024 01:29 |
|
http://alain.colmerauer.free.fr/ArchivesPublications/HistoireProlog/19november92.pdf it turns out you don't need to re-implement natural numbers or lists, or a stack machine to write hello world in prolog. hint: hello world in prolog is actually :- writef("%w",["Hello, world!"]). or something.
|
# ¿ Jul 8, 2009 21:50 |
|
Sartak posted:It's prolog. This would explain the response I got to this childish job advert. I wrote them an email berating them for using popular languages like erlang and haskell and so sent them a prolog response to elicit the following reply: quote:FAIL: We were trying to figure out why this is a fail.
|
# ¿ Jul 9, 2009 10:56 |
|
you have to measure to find the slowdowns before removing them. the one possible exception is where you write a purposefully and knowingly use piece of slow code, or use a slow library in place of a faster one for ease of development. but even so, it's too easy to be mistaken about possible improvements, and sometimes for a supposedly better algorithm a big-o notation hides really big constant values, or piss poor cache behaviour.
|
# ¿ Jul 26, 2009 16:10 |
|
dancavallaro posted:Ummmmm duh didn't you know that a famous computer scientist said gotos are bad? So obviously we should never use them. And also Knuth said we should never do optimizations because they're evil. http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
|
# ¿ Jul 27, 2009 12:42 |
|
Badly remembered kernighan quote: I have found the amount of local variables, and not the function length, to be a good indicator of if a function should be split up.
|
# ¿ Jul 30, 2009 14:59 |
|
Jethro posted:not the "critique my dba by looking at 10 lines of application code" thread. that was written by the lead architect*. many of his contributions have been posted before: code:
edited to add: I don't work there
|
# ¿ Aug 17, 2009 17:17 |
|
It might be some 'fix' for some horrible locking bug
|
# ¿ Aug 24, 2009 21:48 |
|
We already have a php coding horrors thread
|
# ¿ Sep 9, 2009 12:07 |
|
http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html hakmen is the real hackers' file. esr's dictionary is best left to rot somewhere.
|
# ¿ Oct 6, 2009 12:24 |
|
Vexed Morgan posted:hey, Oderint, dum metuant I'm not scared of 'bullets slathered in pork fat'.
|
# ¿ Oct 6, 2009 13:13 |
|
pokeyman posted:I can't figure out a way to make yes take a line feed. Just strips slashes here on OS X. code:
|
# ¿ Nov 14, 2009 16:33 |
|
ton1c posted:You know it's funny, a good number of people reading this thread and that reddit thread would probably be guilty of a number of things in this thread. I'm pretty sure some of the posts have been people outing some of the horrible code they've written. It's rather cathartic. quote:Programming should be more like music, where you compete against yourself rather than bash those who suck, but then nothing would get done. Hackers and Composers eh? I'm not sure you can attribute the desire to code to a competitive element alone, nor any progress to such a poor motive.
|
# ¿ Nov 15, 2009 16:35 |
|
Zombywuf posted:I once wrote one 4 screens wide: As someone else who was paid to write a series of regular expressions to translate html into well formed xml I would like to say
|
# ¿ Nov 16, 2009 12:02 |
|
For example, Cantor did 9/11
|
# ¿ Nov 29, 2009 06:15 |
|
poopgiggle posted:No I'm pretty sure that it's because the kind of people who seek out languages like Haskell and Erlang are the kind of people who tend to design their code well in the first place. correlation is causation. thanks for that insight.
|
# ¿ Nov 29, 2009 16:48 |
|
quote:If you're offended because you don't know Haskell or something, I am offended by haskell. Turns out that disliking functional programming is obviously my dirty secret. Maybe I should stick to PHP. quote:I should clarify that functional-seeking-programmers are a proper subset of good programmers. A good programmer seeks functional languages (in that they attempt to understand various methodologies of programming), but seeking functional languages will not make you a good programmer. I would posit that the reason we don't see as many bad programmers using functional languages is that they aren't as popular.
|
# ¿ Nov 29, 2009 18:42 |
|
poopgiggle posted:But really I think everyone should get a copy of The Haskell School of Expression and work through the excercises. Learning functional programming methodology is valuable even if you never use Haskell again, and drawing snowflake fractals is more fun than "hay guys check out this two-line lazy Quicksort." On the other hand if you're looking for a short and useful introduction to the language, I would recommend Programming Haskell. I found it focused on the concepts of the language rather than trying to get you to draw pictures and sounds.
|
# ¿ Nov 29, 2009 18:48 |
|
poopgiggle posted:Alright next time I'll write 3 paragraphs that explicitly spell out what I mean so that pedants can't pick my wording apart. Admittedly, my initial response was rather terse too.
|
# ¿ Nov 29, 2009 20:06 |
|
Dijkstracula posted:Yes, the pattern matching stuff in Erlang is very cool, but every single other person in this thread saw it with Prolog in their third year of uni, so we don't feel the need to extol the virtues of a programming paradigm that isn't news to us. And it is a lot more neat in prolog than it is in erlang: append([],X,X). % appending a list to an empty list is the same list. append([H|T],L,[H|O]) :- append(T,L,O). % appending a list to a list, is appending the head of a list to the output, where the output is the result of appending the tail of the list to the other list. Then you can use append to get the last element from a list: :- append(_,[X],[1,2,3,4]). X = 4?
|
# ¿ Nov 30, 2009 15:35 |
|
RussianManiac posted:At least hexadecimal used Java I wonder how you know this
|
# ¿ Jan 2, 2010 01:44 |
|
Zombywuf posted:Isn't numbering boxes on a flowchart a COBOL thing? Because numbers are much more readable than named functions or some such nonsense. Those are line numbers
|
# ¿ Jan 2, 2010 13:30 |
|
Zombywuf posted:13627C? from the above source: code:
|
# ¿ Jan 2, 2010 13:35 |
|
tripwire posted:Wow, thats insane! It's almost like having an interactive c REPL console for loving around with. I could see that coming in handy for just testing snippets of code without bothering to build and make a big project. http://neugierig.org/software/c-repl/ * 20 minutes of haranguing haskell, and I now get this* code:
tef fucked around with this message at 13:16 on Jan 14, 2010 |
# ¿ Jan 14, 2010 12:44 |
|
Zombywuf posted:Looks clear enough to me. On the plus side, zhentar won't have to take zombywuf seriously any more.
|
# ¿ Jan 29, 2010 16:03 |
|
MononcQc posted:Erlang only got SMP support in 2006 (R12B, if memory serves me right). The way it was done was by having a scheduler represented as an OS thread Aside: couldn't you just run one erlang vm per core before this to get smp like behaviour?
|
# ¿ Feb 2, 2010 12:56 |
|
Bozart posted:Probably already been seen, but at work I ran into: In visual basic, true = -1 and false = 0
|
# ¿ Feb 10, 2010 12:32 |
|
Zombywuf posted:If you think that's bad I had to work with a guy who would dismiss other peoples problems at face value because of their simplified explanation, only then to whine about his problems in a similar manner.
|
# ¿ Feb 15, 2010 20:27 |
|
Have you seen what happens when they try to program
|
# ¿ Mar 4, 2010 01:47 |
|
Otto Skorzeny posted:For C or Obj-C, clang. For C++, nothing yet. clang is worth keeping an eye on for c++ support
|
# ¿ Mar 14, 2010 09:56 |
|
rt4 posted:I'm probably going to get poo poo on for asking this, but... it's easier to crash on an error and restart than recover in some cases. for example: http://en.wikipedia.org/wiki/Crash-only_software
|
# ¿ Mar 24, 2010 22:05 |
|
Flobbster posted:I just wrote the programming equivalent of the "Buffalo buffalo buffalo" sentence: This is wonderful.
|
# ¿ Mar 30, 2010 20:51 |
|
rt4 posted:Nicer than what? Not trying to be snarky; I just don't get it. http://en.wikipedia.org/wiki/Stockholm_syndrome
|
# ¿ Apr 23, 2010 00:31 |
|
HFX posted:This is great until you are working with several companies where you don't have source code to the upper class and you realize you need to override just one behavior. Implicit virtual is also simpler. If by simpler, you mean 'Easier to write fragile code that breaks', sure.
|
# ¿ Jun 2, 2010 11:44 |
|
The fake one is gpc_magic_quotes
|
# ¿ Jun 10, 2010 23:07 |
|
http://blog.devinterface.com/2010/06/design-patterns-in-ruby-abstract-factory/
|
# ¿ Jun 21, 2010 22:42 |
|
they're called race conditons because they make the code go faster
|
# ¿ Jul 8, 2010 18:19 |
|
TRex EaterofCars posted:We used to have this nonsense along with making sure we named each class with a public static String MODULE. We used to have to update version numbers in multiple files in every svn commit. It was the source of frequent conflicts.
|
# ¿ Aug 22, 2010 03:21 |
|
svn:keywords revision http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
|
# ¿ Aug 22, 2010 13:48 |
|
|
# ¿ May 15, 2024 01:29 |
|
Plorkyeran posted:And you did it more than once before writing a commit hook to do it automatically? I wasn't 'allowed' to change it for four months or so.
|
# ¿ Aug 22, 2010 13:48 |