[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

dynamic languages and software projects

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 24
Thread images: 2

File: Screenshot_20170529_233241.png (229KB, 1920x1080px) Image search: [Google]
Screenshot_20170529_233241.png
229KB, 1920x1080px
How do you even build software with dynamic typed languages?

I know it's possible to build maintainable and reliable software using them, as python is a strong example, but I find myself *struggling* with a cognitive overload.

Any good resources to understand how to really take advantage of it?
>>
It will require certain discipline at first, but as you practice it will come naturally.
Just make the software you. want to make.
>>
>>60649027

How is it any different than using a compiled language?
>>
>>60649145

I know I'm not knowledgeable enough, but I find myself inferring too many things from the readability of the code instead of its syntax system.

Input/output and what objects I'm actually handling and what I can do with them.

I'm aware that eventually as I code more I'll be more in touch with the standard libraries and what not, but I feel like I could start doing something relatively big in *random compiled language* and I wouldn't need to think about those things and everything would go smoother.
>>
>>60649027
The only language with dynamic type checking worth using is Common Lisp.
>>
>>60649027
>How do you even build software with dynamic typed languages?
You don't.
There isn't any nontrivial and worthwile software implemented in dynamically typed languages.
>>
>>60649338
I'd actually like to learn lisp, but I'm trying to finish a bunch of projects first. I mostly got curious about it because emacs and clojure.

>>60649352
> how do I google?
>>
btw not sure I could have written the OP worse than that one
>>
>>60649318

Maybe you're programming the wrong way, you're supposed to write in small parts you can immediatly test, test to see if there's bugs and then continue.
At least thats how I do it, and I use picolisp which is completely dynamic and have written somewhat large programs in it just fine.
>>
>>60649392
Prove me wrong, feggit. Pro-tip, you can't.
Examples of trivial and not worthwile softwares:
>anything browser engine based
>deployment frameworks
>web backend anythings
>youtubedl
>frameworks for dumb chinese adventure games
>bindings to machine learning and computer vision libraries
>CRUD software of any kind
>muh first microcontroller/sensor shit
>>
>>60649027
>>60649027
They come with a compiler
If your compiler is smart enough it'll come with a compile option

you use it
it compiles

bam

see: SBCL
>>
>>60649027
what a nice fucking screen. It makes me feel the urge to learn to use spacemacs.
>>
File: Screenshot_20170530_002656.png (179KB, 1920x1080px) Image search: [Google]
Screenshot_20170530_002656.png
179KB, 1920x1080px
>>60649528

Yeah, I understand how to write good code, but when writing personal projects I tend to go out of my way to understand as much as I can in the way and I end up needing to refactor many things. I'm never happy with what I do either; I tend to refactor, iterate and ruminate too much over supposedly unnecessary things.

>>60649537

Is your english lexicon composed only by memes? You have plenty of examples that don't fit within those meme arrows but I'll let you do the hard work here and figure it by yourself.

>>60649550

I'm not sure about this because I haven't take the time to read about it, but IIRC that depends on the language implementation and there is no compiled implementation of python AFAIK, right?

>>60649569

I come from a vim background and I'm enjoying spacemacs. I still need to work on a few things like programmatically generate code like I was (barely) doing with vim, but apart from that it really looks promising. Looking forward to moving from spacemacs to emacs already.

Anyway, colour setup is just KDE+konsole (tmux session with spacemacs, pdb and a shell). My other box has a light solarized palette and is a total blast to use either of them.
>>
>>60649801
>Is your english lexicon composed only by memes? You have plenty of examples that don't fit within those meme arrows but I'll let you do the hard work here and figure it by yourself.
>waah there aren't any worthwile things
>better shift the burden of proof to him

>>60649801
>there is no compiled implementation of python AFAIK, right?
You mean, as in AOT compiled?
There is but it only is remotely fast if you use its own static type annotations and other non-standard things.
>>
>>60649883

Scipy, pandas and django are a bunch of big projects. You've also dismissed several big software projects for no reason in your memearrows, that's why I'm expecting you to complain about whatever I may talk about. I'm talking about reliable and maintainable big software projects, preferences of workfield aside.

There are several big companies that either have one of their core products in a dynamically typed language or have big teams using one.

As for the compiled python, it's like saying you can compile python to java bytecode; is it really worth it? At least typescript seems to improve javascript and it's actually backed by something.
>>
can someone explain to me what the point of dynamic typing is ?
>>
>>60650327

Make code look more like written language.
It obviously works better with something like Forth or Lisp since it comes for free.
>>
>>60650358
i still don't get the point, just because you drop the type declarations and hope for the best ?

and imho it makes code harder to read. i had to modify some python code and implement something similar to onion encryption for an assignment once, there was a line
shared_element = private_key * public_key
in the code.
what the heck is the result of a multiplication of shared and a public key ? and what datatype is the result supposed to be ?

because it was dynamically typed i didn't actually need to care about it, but i honestly don't understand why you would want something like that.
>>
>>60650635

The problem is the multitude of types you have in pythin.
In non-ansi lisps that is a non-issue
structs? a list
addition? list can be added and concatenated

Same with forth code since everything is a number you can do any operation as long as you understand what youre doing.
Your problem is seeing things from the worst untyped language perspective, python is a joke famamalam but people use it because
>just import lel
>>
>>60650693
i've only used common lisp (the CLOS is awesome) but even there i've used type specifiers whenever it was possible because it makes everything much more readable and many things easier to deal with

>Same with forth code since everything is a number you can do any operation as long as you understand what youre doing.
that kinda applies to C too
>>
>>60651066

Thats why I said non-ansi, the only datatype of a lisp is supposed to be the cell to which you can do anything.
So it wouldnt be a problem if you said
 (set a "ok" b "ko") (+ a b) 

You would be adding whatever is in the car of the cell, say if the cell size is 4 bytes then you'd be adding that even if you typed it as a string.
Same thing with a forth or like you said C, but IMO in C that would be getting into voodoo territory since its not supposed to be used that way.

My point is that types are just an illusion, and python does it halfassedly thats why there's confusion as to what dynamic languages are meant to do.
>>
>>60649027
Well dynamic languages should offer you superior meta-programming abilities, use that to write more compact or more general code, and write more tests.
>>
>>60650635
>i still don't get the point, just because you drop the type declarations and hope for the best ?
fundamentally, a lot of type declarations are verbose and/or redundant because the compiler can deduce the type. aside from the maintenance burden, overly-restrictive types can make code less generic and reusable.

"statically typed" languages often have very poor support for runtime types and don't manage the relationship between compile and runtime types very well. this inhibits useful programming styles like reflection

now let's be clear: what Python does is truly wretched. but take a look at a language like Julia which has "dynamic" deduced compile-time types that are no different from runtime types, are actually used by the JIT compiler for performance, and can be optionally declared on any use
>>
>>60651410
>"statically typed" languages often have very poor support for runtime types and don't manage the relationship between compile and runtime types very well
don't get me wrong, but doesn't that just mean either the specification or implementation is lacking ?
Thread posts: 24
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.