|
rotor posted:has anyone ever written forth? it seems so neat. there's a guy I know who writes these little five-line forth programs to draw roses or bridges or such, they're cool.
|
# ¿ May 2, 2012 05:06 |
|
|
# ¿ May 14, 2024 15:31 |
|
Police Academy III posted: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. if you want to complain that it *should* have arrays, that's fine, but stop pretending to be offended because the lua implementers decided your pet feature wasn't necessary to the language.
|
# ¿ May 6, 2012 22:54 |
|
Police Academy III posted:frig off janin, a proper array datatype is hardly an obscure feature request
|
# ¿ May 6, 2012 22:58 |
|
Police Academy III posted: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. ahhh spiders posted:arrays are just a specialization of tables, which happen to be in lua already
|
# ¿ May 6, 2012 23:15 |
|
ahhh spiders posted:they're tables with a contiguous and totally ordered keyset it's true that an array can be losslessly converted to a table and back, but that's not the same as saying that arrays are a type of table.
|
# ¿ May 6, 2012 23:27 |
|
Char posted:if you use haskell for production builds you're missing the entire point of haskell
|
# ¿ May 12, 2012 01:33 |
|
Char posted:this is a trick question right between its strong type system, good performance, and easy C binding system, it's practically ideal for writing reliable production services. I can't really think of what else you'd use it for; static typing is annoying for small scripts, and Haskell binaries are too large to use in embedded systems.
|
# ¿ May 12, 2012 01:53 |
|
ppp posted:i thought validated languages were a solved problem with ada yaoi prophet posted:qft, if you link hxt which is one of the heavy-duty xml processing libraries you get like 30 extra megs on your binary, 20 if you strip it why yes, I would like to install three hundred megs of dependencies to parse a 1kB xml document!!!
|
# ¿ May 12, 2012 02:42 |
|
Internaut! posted:speaking of haskell janin how painless is C and C++ interop, I've taken this little clojure side project as far as it can go and it's been fun but it's not like I actually planned to suggest dropping a JVM bollock into our core trade switching punchbowl Bindings to old-fashioned C can be a *little* iffy if your library's interface uses language features that don't have a direct Haskell equivalent, such as static global initialisation. These are widely regarded as poor design, so they aren't common, but if you're writing a binding to a library written in the '80s then you're in for some adventure. Bindings to modern C are trivially easy, there are tools that will parse C header files and generate all the stubs for you. Runtime overhead is low since calling a foreign function is literally just a standard C procedure call. Basically you just say "here's a header, here's the function I want" and then you compile and you've got a usable binding.
|
# ¿ May 12, 2012 02:59 |
|
MononcQc posted:It just sucks that some things like 'forall' for types ends up being overloaded depending on what compiler extension is plugged in. I try to avoid all the scary-named extensions so maybe there's some out there that do additional weird stuff with it, idk.
|
# ¿ May 12, 2012 03:02 |
|
yaoi prophet posted:wait how do you generate the foreign import declarations from header files code:
code:
code:
TOO SCSI FOR MY CAT fucked around with this message at 04:19 on May 12, 2012 |
# ¿ May 12, 2012 04:05 |
|
yaoi prophet posted:the one feature i really wish haskell had was the ability to say 'ok what type does x have to be for this to typecheck', you can do it manually via implicits (which is the only time i've ever seen anybody use implicits) but having something like agda's holes would be gr8 Internaut! posted:perfect, and how about the reverse? this code chunk I'm looking at has hundreds of C tests making direct function calls, if there's an easy way I can adapt/reuse those tests then that would both save a lot of time and make the approach easier to sell up
|
# ¿ May 12, 2012 16:47 |
|
rotor posted:the unicorn doesn't work! oh boy, an anime-themed language with libraries by people who think wearing sunglasses makes them a frat boy. sign me up!!
|
# ¿ May 13, 2012 04:36 |
|
Internaut! posted:yeah I read the explanation but I don't buy it, it sounds like rationalization imagine you had a c++ compiler which would take the following procedure: code:
code:
|
# ¿ May 14, 2012 15:43 |
|
Internaut! posted:eh I understand how it works, to me a compiler that doesn't catch type errors in a statically typed language is broken but w/e
|
# ¿ May 14, 2012 16:35 |
|
Markov Chain Chomp posted:just ban both lovely trolls
|
# ¿ May 14, 2012 16:47 |
|
Ronald Raiden posted:someone give me an idea for a cool (and maybe useful???) thing to do wiht haskell so I have a reason to mess around with haskell again tia
|
# ¿ May 14, 2012 19:23 |
|
tef posted:just use a haskell version of the tex hyphenation algorithm http://hackage.haskell.org/package/hyphenate nice job, good idea representing an unbounded set as a constructor, that'll never be a problem
|
# ¿ May 14, 2012 22:12 |
|
Police Academy III posted: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:30 |
|
Mr Dog posted:It wouldn't have been hard to retrofit a non-retarded behaviour in Python 3, either, just add a has_next or __has_next__ or whatever method to the iterator protocol and then keep the existing StopIteration behaviour as a genuine "you did something you weren't supposed to do, bonehead" exception, albeit a poorly named one. Even a __boolean__ coercion, while kinda terrible, would have been better than just leaving that wtf in its current form. A better solution would be to have next() return a wrapper with .value and .has_value attributes, but this would have broken backwards compatibility.
|
# ¿ May 17, 2012 16:37 |
|
Dr. Honked posted:surely you buffer poo poo like that?
|
# ¿ May 17, 2012 19:11 |
|
Shaggar posted:you buffer the data that you are iterating over... code:
|
# ¿ May 18, 2012 06:02 |
|
BonzoESC posted:so what you're saying is that it works best if the enumeration loop knows what it's enumerating over, so you can have one version for arrays and other bounded collections and one for IO that reads until exhausted, but both present the same API to higher-level code so you don't have to care? the api they're complaining about is the one for IO
|
# ¿ May 18, 2012 16:49 |
|
BonzoESC posted:nah they're at a lower level if they have to worry about exceptions from the array ending Iterators are for when you're looping over a value which doesn't have a fixed size, and might need to perform arbitrary IO to calculate the next element. And why would you ever want a lambda with more than one expression? If you really need to use statements in a loop for some horrible reason, just define a local procedure.
|
# ¿ May 18, 2012 18:29 |
|
In Python, it's more idiomatic to use existing control structures like 'if' or 'with', rather than inventing your own ad-hoc.code:
|
# ¿ May 18, 2012 19:09 |
|
iamthexander posted:answer my question nerds
|
# ¿ May 19, 2012 19:56 |
|
yes lets have everything go through loving disk io zombywuf, you're even dumber in yospos then you are in coc. you're like tiny bug child, except even he can get by in at least one language.
|
# ¿ May 30, 2012 15:22 |
|
Zombywuf posted:http://www.boost.org/doc/libs/1_46_1/libs/iostreams/doc/guide/pipelines.html code:
|
# ¿ May 30, 2012 16:19 |
|
Zombywuf posted:I wouldn't criticise other peoples ability to get by in multiple languages if I were you.
|
# ¿ May 30, 2012 16:46 |
|
Zombywuf posted:
|
# ¿ May 30, 2012 17:06 |
|
Ridgely_Fan posted:well the spec was written in haskell and no non-spergs can read that
|
# ¿ May 30, 2012 17:17 |
|
ZShakespeare posted:For one of my final projects before I get my degree I have to learn a "weird" language and do a big report that compares and blah blah blah with examples. The suggested languages are Clojure, Erlang, Go, Groovy, and Scala. I can ask for approval to do any language though as long as it's an actually language so no HLA or forth or some poo poo like that. why aren't you allowed to use forth? it's got a language spec, several mostly-compatible implementations, and lots of libraries. Another unusual language is J http://www.jsoftware.com/
|
# ¿ Jun 26, 2012 06:09 |
|
Condiv posted:so, I have to wonder if there's a language that is anywhere near as binary incompatible with itself as Scala is. Object code and shared libraries built from Haskell source have their ABI version set to essentially SHA1(signatures of all public and private declarations from entire dependency tree). Dynamic linking is implemented in the compiler but is essentially worthless, because even the most minor change to a library causes the ABI to change and all executables to refuse to load the new .so file.
|
# ¿ Mar 26, 2013 23:10 |
|
|
# ¿ May 14, 2024 15:31 |
|
MononcQc posted:Again, I haven't ever programmed go, so my opinion isn't worth much on it. If you go into it expecting C with more reasonable syntax and an immature compiler, plus some basic threading primitives, you'll be happy. It's a decent replacement for Python in cases where eval() isn't needed, and not quite as mind-numbingly verbose as Java. The interface concept is nice. But make no mistake, it's a very very conservative language. Writing in Go feels like stepping through a wormhole into the '80s. There's no real type inference[1], no type parameters, no re-exporting imported symbols, no typed enums, and no encapsulation (!!) except at the file/package level. It's obvious that the core developers think C89 was the absolute pinnacle of language design. [1] Variable assignments use the equivalent of C++'s "auto" keyword.
|
# ¿ Mar 29, 2013 06:49 |