|
BonzoESC posted:wait are classes in python not just objects? yes they are, but there's not a nice way to make anonymous ones, you have to do something like t = type("bullshit_name", (SuperClass,), {"a_dict": "of attributes"})
|
# ¿ Apr 25, 2012 23:58 |
|
|
# ¿ Apr 27, 2024 13:49 |
|
also, if anyone's curious, here is a list of the real (ie non-syntactic) differences between python and ruby:
|
# ¿ Apr 26, 2012 00:06 |
|
the best language is lisp and the only people who don't think so are those too dumb to understand lisp. c is also good b/c you can write lisp interpreters in it.
|
# ¿ Apr 26, 2012 00:14 |
|
tef posted:python you can monkey patch built-in types using ctypes please explain, this sounds wonderfully hacky
|
# ¿ Apr 26, 2012 01:17 |
|
Anal Tributary posted:what defines something decent in a github, anyways? i've been asked for portfolios and never know what to say because none of the dev stuff i've done ever ends up launching, but i have some github repos with decent code in them. ya i'd also like to know this, since i don't really see anybody wanting to pull from "lisp interpreter that takes as long to garbage collect as it does to actually run anything" or "dumb ruby roguelike with terrible web interface"
|
# ¿ Apr 26, 2012 04:53 |
|
baxate posted:Computer Science is terrible, get a real degree. it's 2012 buddy, there are no real degrees
|
# ¿ Apr 26, 2012 05:02 |
|
BonzoESC posted:
ur supposed to count them though the_string.group_by {|x| x}.map {|k, v| [k, v.size]}
|
# ¿ Apr 26, 2012 18:23 |
|
tef posted:I almost forgot https://gist.github.com/295200 it's beautiful, tyvm
|
# ¿ Apr 26, 2012 19:43 |
|
Internaut! posted:I've always wanted to learn a lisp and clojure seemed like a good one clojure's the most "modern" lisp and doesn't have alot of the cruft and implementation issues that CL and Scheme have. It's also got a lot of nice features like data structures as functions and super cool lambda syntax adn lots of nice functional programming stuff, and a heavy focus on concurrency which i've never cared about but you might. It does have a lot of dumb problems though, e.g:
|
# ¿ Apr 27, 2012 04:47 |
|
my biggest gripe with strings is that all the standard seq functions convert strings into lazy seqs of characters which don't work when you need a string. (not= "aaa" (reverse "aaa")) is pretty annoying, and my code always ends up looking like code:
that said clojure's pretty cool despite its faults. i kinda want to dig up what little i know of prolog and do something with core.logic, if only i can think of something
|
# ¿ Apr 27, 2012 17:12 |
|
Fren posted:I want to jump from Common Lisp to clojure but i hate working with the java runtime. like i need to run lein and poo poo and i need a project.clj and all that dumb poo poo. i can't just start throwing poo poo into a file like common lisp. also the syntax is less unified and all the [vector] and {hash} poo poo throws me off because i'm used to everything being in parens um, you definitely can just throw poo poo into a file w/o worrying about lein and all that poo poo, that's 90% of what i've done w/ clojure. and the []'s and {}'s own since they provide some visual variety and make it easier to pick out lets and such. basically what i'm saying is u should learn clojure since its pretty cool
|
# ¿ Apr 27, 2012 17:53 |
|
HORATIO HORNBLOWER posted:sounds like someone couldn't hack it at state college! the idea of education as bettering yourself is just subtle classism, hth
|
# ¿ May 1, 2012 06:57 |
|
graphs are the most pro-tier data structure, 420 do iterative deepening search everyday
|
# ¿ May 4, 2012 19:38 |
|
caring about whether 0 is false or not is bikeshedding as hell, hth also if you want a lightweight scripting language you should be using a lisp and not some gay mashup of javascript and visual basic.
|
# ¿ May 6, 2012 21:51 |
|
ahhh spiders posted:why because lisp is the best language, idk how this could be confusing
|
# ¿ May 6, 2012 21:58 |
|
ahhh spiders posted:functions are already first-class values in lua so why would you use lisp lol "functions are first-class values", im sure this is a shocking concept to java programmers but ppl with taste expect a little more
|
# ¿ May 6, 2012 22:00 |
|
"why would i use the single most powerful language available when i could add in the overhead of parsing and be able to use 1-indexed arrays?" - a bad programmer
|
# ¿ May 6, 2012 22:03 |
|
but for reals spiders, idk what you're so up on lua about. I mean lightweight embeddable scripting is cool, but the language itself is really just one step up from tcl.
|
# ¿ May 6, 2012 22:08 |
|
ahhh spiders posted:it's even simpler than tcl, which is awesome simpler how? because using the same datastructure for lists and hashes may keep the implementation simple but its a pretty php thing to do.
|
# ¿ May 6, 2012 22:20 |
|
the syntax may be the same, but the semantics of arrays and hashes should be different, and being able to docode:
|
# ¿ May 6, 2012 22:27 |
|
ahhh spiders posted:why? because the list doesn't have 7 elements, the language never tells you if you're using an index that's out of range. it just magically does something which is, again, pretty php
|
# ¿ May 6, 2012 22:33 |
|
Fren posted:common lisp rules face
|
# ¿ May 6, 2012 22:33 |
|
ahhh spiders posted:you're just griping for the sake of it of course i am, i don't use lua. ahhh spiders posted:also there's no such thing as an index being out of range, because it's a table that's my whole point! arrays are not tables, they should have semantics specific to arrays, like index bounds. assembly lets you use a machine word as an int or a memory address or a float or an instruction, but most of the time that's not a good idea and you want assurance that something that is intended to be used in a certain way will be used in that way.
|
# ¿ May 6, 2012 22:43 |
|
Janin posted:lua doesn't have arrays. it has tables. frig off janin, a proper array datatype is hardly an obscure feature request
|
# ¿ May 6, 2012 22:56 |
|
Janin posted:obscure or not, they're not necessary. arrays are only useful if you're going to be doing some sort of performance-sensitive computation. lua is explicitly designed to be a glue language, so there's no point in having features like arrays. it's not about performance, i don't care if they implement arrays with a loving bloom filter. it's about ensuring that data that is supposed to be used in a certain way is actually being used in that way. the single most common type of datastructure in all programming is "numbered list of stuff", in lua you have no guarantee that a numbered list of stuff will remain a numbered list of stuff.
|
# ¿ May 6, 2012 23:09 |
|
Janin posted:So go write an array type yourself. Or use someone else's -- if they're as useful as you claim, someone else will already have written one. man idgaf, i just don't really understand why spiders is so hot to trot about lua when it has bad php stuff in it.
|
# ¿ May 6, 2012 23:19 |
|
ahhh spiders posted:welcome to my ignore list can you buy me a big red title too? it'd be nice to get rid of babytar here.
|
# ¿ May 6, 2012 23:22 |
|
Hammerite posted:tef ive seen you say that in python strings are "infinitely deep" a couuple of times. what does this mean tia it means that indexing a string gives you another string, so you can do "fart"[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]...
|
# ¿ May 8, 2012 02:02 |
|
computers are basically pretending machines when you think about it
|
# ¿ May 8, 2012 17:06 |
|
one of my fav bits of useless trivia is that ANSI C specifies that a char is 1 byte, but doesn't say that a byte has to be 8 bits.
|
# ¿ May 16, 2012 04:24 |
|
c99 actually has a bunch of cool features, my fav is designated initializerscode:
|
# ¿ May 17, 2012 05:50 |
|
ya, you've got to spend like 6 lines of code just to make some dumb class to hold 2 values and then 8 more lines for getters + setters if you don't want to piss off the java oop sperg gods. basically what im saying is that java is terrible.
|
# ¿ May 18, 2012 23:37 |
|
someone tell spiders he should've used a defaultdict there
|
# ¿ May 19, 2012 21:44 |
|
BonzoESC posted:so, "hello world" lol
|
# ¿ May 29, 2012 22:57 |
|
Meiwaku posted:Beyond all the other cool stuff Clojure offers, it's new "reducers" which provide auto-parallelizable collections is an unbelievable killer feature. stuff like this makes me excited about clojure but it also makes me worry that they'll keep adding in more random academic poo poo instead of making docs and error handling that aren't terrible
|
# ¿ Aug 6, 2012 07:57 |
|
I mean look at this poo pooquote:index
|
# ¿ Aug 6, 2012 08:26 |
|
Meiwaku posted:I think you're looking for this; it's nice that someone is working on making the docs less lovely, but
|
# ¿ Aug 6, 2012 19:26 |
|
graph posted:lol if you go to college to learn how to program I went to college to learn how incredibly dumb smart people can be.
|
# ¿ Aug 6, 2012 22:09 |
|
speaking of p-languages, can someone w/ clojure installed run this and tell me what happens?code:
|
# ¿ Aug 11, 2012 01:54 |
|
|
# ¿ Apr 27, 2024 13:49 |
|
trex eaterofcadrs posted:(fart 1) did you actually run it though? because I get code:
|
# ¿ Aug 11, 2012 02:04 |