[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]

What does anon's dream language look like?

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: 53
Thread images: 4

File: C++.png (40KB, 1620x774px) Image search: [Google]
C++.png
40KB, 1620x774px
What does anon's dream language look like?
>>
>>60097413
D
>>
>>60097413
C with more C.
>>
>>60097413
Clojure without the JVM.
>>
>>60097520

>without the JVM.
But that's like the only part of the Java ecosystem that's good.
>>
File: CommonLisp.png (20KB, 256x150px) Image search: [Google]
CommonLisp.png
20KB, 256x150px
>>60097413
>dream language
If you will it, it is no dream.
>>
>>60097413
I want higher higher higher order functions up to n levels of meta for a super meta language so I can meta while I meta while I meta...
>>
>>60097570
I'm just learning Scheme now. LISP is really awesome but I don't get this:

(cons (cons (cons A ()) B))

What the hell is this?
>>
>>60097666
Not a valid expression as far as I'm aware. You're consing A onto nil, then consing that onto B, then consing that onto nothing? You're missing an argument bruh.
>>
>>60097666
okay, I'm going call-by-value here:

(cons A ()) --> (A)
thus,
(cons (cons A ()) B) --> (A B)

the cons before that doesn't make any sense since you need two arguments for cons, a new element and a list to add it to.
>>
>>60097666
nice trips though
>>60097710
beat me to it
>>
I dream in language
>>
>>60097785
Nah the whole thing is fucked.
(cons A ()) -> (A)
(cons (cons A ()) B) -> ((A).B)

To get (A B) it would be (cons A (cons B ()) since the second argument to cons is the cdr.
>>
>>60097822
Oh... right. My bad.
>>
I guess C#, which would compile to machine code instead of another virtual machine.
And had FLOSS cross-platform compilers (Mono doesn't count, it is like reverse-engineering, works, but could be better).
>>
>>60097710
>>60097785
>>60097800
>>60097822
Sorry I meant
(cons (cons (cons A ()) B) C)

My question is why does scheme return this for a list sometimes when I expect this instead:

(A B C)
>>
>>60097413
There are so many great languages now: OCaml, Haskell, Clojure, Perl 6, Rust, Elixir, Agda, R...

My problem with modern programming is more within the ecosystem.
>>
>>60097413
Rust
>>
>>60097413
Factor but actor model.
>>
>>60097914
Read up on lazy evaluation, call-by-need and call-by name.
>>
>>60097485
fpbp
>>
Java the way it was intended to be, without Google fucking with it and turning it into a proprietary format.
>>
>>60097547
its bloatware.
>>
>>60097520

Functional programming is the 'fair trade coffee hipster with a man-bun taking about drain pouring IPAs that aren't microbrew' of the technology world.
>>
>>60098119

"I don't know anything about actually programming, but what I do know about it is what I've gleaned from memes /g/"
>>
>>60097413
C with built-in vectors, smart/shared/weak pointers, a string type (not a replacement for C strings, just a safer alternative) and other niceties.

Basically just take good ideas from C++ and add them into C minus the OOP. You can already sort of do this with extra libraries but there are some unavoidable limitations and problems that could be solved by outright incorporating the features directly into the language.
>>
>>60098220

You know you don't have to use every feature of C++ just because it's there, right?
>>
>>60098230
It still feels dirty to use even without touching the shit parts.

Nonetheless it's still my language of choice, but if we're describing our dream language it would be what I described, I'd like to not have to use such a dirty language.
>>
>>60097570
I want a nice statically typed Lisp.
>>
Syntax either
SML like with parentheses instead of
let ... in;

or lisp like but supporting java like arrays
 (let ((x:int[5])) (dotimes (n 5) (setf x[n] 0))) 


Statically typed but with type inference
Macros
inline C and easy interface to C, compiler being able to parse C headers
Manual memory management but starndard library providing allocators
Standard defining project layout and compiler needs to be able to compile whole projects
>>
>>60098296
Then you're in luck. Lisp's abstraction level lets you define any type system and evaluation strategy you may wish for.
>>
>>60098291
I know the feel: someone should create a ISO standard for a subset of C++ called C--, it would be so good...
>>
>>60098296
https://docs.racket-lang.org/ts-guide/
>>
Swift but general purpose.
>>
>>60097413
statically typed python
>>
>>60098714
nim?
>>
>>60098663
>>60098291
vala?
>>
>>60098726
>>60098663
>>60098291
ecere
http://ecere.org/
basically vala but without dependencies to Glib
>>
>>60098783
http://ec-lang.org/
more informative link
>>
>>60098722
this is really nice
thanks anon
>>
>>60098726
Vala is object oriented, too.
>>
>>60097413
Something like C but more user friendly like python.
>>
LADDER LOGIC
>>
>>60098137
Functional programming is now the accepted way to do things.
>>
>>60097413
I'd be interested in seeing an assembler but with static strong / dependent type system.
>>
File: image.jpg (152KB, 2048x1018px) Image search: [Google]
image.jpg
152KB, 2048x1018px
This
>>
>>60097413
C but with preprocessor macros that can also be written in C.
basically, >>60097502

Also, optional sane default built-ins like >>60098220 is not a bad idea.
>>
>>60099176
>not using wingdings instead of letters

Not even trying
>>
File: Hannah_Montana_Linux.jpg (223KB, 500x417px) Image search: [Google]
Hannah_Montana_Linux.jpg
223KB, 500x417px
>>60099176
But be sure to install it on pic related.
>>
>>60097413
Python with Golang types.
>>
>>60098663
https://en.wikipedia.org/wiki/C--
>C-- is a C-like programming language. Its creators, functional programming researchers, designed it to be generated mainly by compilers for very high-level languages rather than written by human programmers. Unlike many other intermediate languages, its representation is plain ASCII text, not bytecode or another binary format.
>C-- is a "portable assembly language", designed to ease the task of implementing a compiler which produces high quality machine code.
>the compiler back ends available to researchers at that time were complex and poorly documented, several projects had written compilers which generated C code
>C is a poor choice for functional languages: it does not support tail call optimization, accurate garbage collection or efficient exception handling. C-- is a simpler, tightly-defined alternative to C which does support all of these things. Its most innovative feature is a run-time interface which allows writing of portable garbage collectors, exception handling systems and other run-time features
>C-- is a target platform for the Glasgow Haskell Compiler. Some of C--'s developers work or have worked on the Glasgow Haskell Compiler
>>
>>60097413
c but it does more shit for you
in fact, basically just what >>60098220 said
>>
>>60099176
I'm reading the docs and this is a surprisingly well-made language. And as far as I can tell it's not just translating to something else and compiling that, it's actually a real compiler.
Maybe with a sed filter this could be made useful
Thread posts: 53
Thread images: 4


[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.