Quantcast
[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
File: 102 KB, 1000x1071, 1484450506936.png [View same] [iqdb] [saucenao] [google] [report]
63021630 No.63021630 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Old thread: >>63012855

>> No.63021653

Should I learn Idris?

>> No.63021654

FUCK OPENGL, though

>> No.63021673

>>63021653
Yes, it's fun.

>> No.63021676

I'm reading in some pixels in C as a character array and then interpreting them as ints and it's reversing the order for some reason?

For example I have 0, 0, 0, 255 but when read as an int it becomes 255, 0, 0, 0. Why? The memory was copied as is.

>> No.63021689

>>63021676
endianness

>> No.63021711

>>63021653
Idris is for brainlets. Learn Rust if you want to know what real functional programming and real powerful abstractions look like. Dependent types are a meme.

>> No.63021822

>>63021711
borrow checker is a meme

>> No.63021839

Does not having a garbage collector have implications for efficient tail recursion?
Does having to release resources before exiting a scope cause problems?

>> No.63021845

>>63021822
Borrow checker is true innovation in type theory, unlike dependent types, which are a 70s meme.

>> No.63021863

Does anyone else feel uncomfortable watching a tutorial video that has a female instructor?
https://www.youtube.com/watch?v=0Zh2vStKT50

>> No.63021871

>>63021845
The borrow checker doesn't have roots in type theory. If it did, it would've already been debunked as a shit idea.

>> No.63021875

>>63021845
>enforced raii
it's nothing

>> No.63021881

>>63021871
https://en.wikipedia.org/wiki/Substructural_type_system

>> No.63021894

>>63021863
No, I'm not insecure.

>> No.63021903

>>63021863
Yes most of the time I wont watch anything with female or negros just because I cant tell if they are legitimate and not just there to meet a diversity quota

>> No.63021905

>>63021839
>Does not having a garbage collector have implications for efficient tail recursion?
Depends on your alternative memory deallocation scheme. If it involves implicitly calling destructors when objects go out of scope, then many apparent tail calls will cease to be such.

>> No.63021907
File: 345 KB, 633x720, 1506432289658.png [View same] [iqdb] [saucenao] [google] [report]
63021907

Employed Haskell programmer here

>> No.63021910

>>63021881
George Soros tells me that Wikipedia contains fake news. So I'm not clicking it.

>> No.63021911

>>63021845
The borrow checker is an idea invented for javascript brainlets. It's one of the most unreadable and unintuitive systems ever designed. It directly fights the way a regular processor works. It forces you to handle memory in inefficient ways. Most importantly it tries to fix concurrent programming, while utterly failing and causing more damage than good. Not to mention the borrow checker is by far one of the most detrimental Rust-ideas for cache performance. Hence why every non trivial (CRUD) program has trash performance in Rust.

>> No.63021925

>>63021911
That's a nice bunch of statements, but I see no logic or evidence to back any of them up. Opinion discarded.

>> No.63021961

>>63021689
c is endian neutral by default. its probably because he isnt iterating properly

>> No.63021968

>>63021911
I bet there's someone who'll take it seriously and will repeat it but unironically.

>> No.63022012

>>63021968
It's true though. Can you point to a single example where the borrow checker will improve performance compared to a language without a borrow checker? It enforces you to make explicit allocations in order to conform to 'safety' yet most of the best optimized software must be unsafe in order to be fast. In most other languages the programmer is tasked with keeping track of race conditions, moving, copying, pointer invalidation etc. If your application is designed properly you will never run into a scenario where you have dangling pointers. This applies to every unsafe language, eg C C++ etc. If you are the type of programming who would write code where you use a single pointer as a global variable and pass it around everywhere, then the borrow checker is acting as a nanny instead of a useful tool.

>> No.63022069

>>63022012
It's false though. Can you point to a single example where the borrow checker will degrade performance compared to a language without a borrow checker? It enforces you to make better design in order to conform to 'safety' and most of the best optimized software must be safe in order to be fast. In most other languages the programmer is tasked with keeping track of race conditions, moving, copying, pointer invalidation etc. If your language is designed properly you will never run into a scenario where you have to do those things. This applies to every unsafe language, eg C C++ etc. If you are the type of programming who would write code where you use a single pointer as a global variable and pass it around everywhere like a brainlet, then stick to C and C++.

See how easy it is?

>> No.63022130

>>63022069
Your last point is incorrect, considering I said that you shouldn't be programming in C/C++ if you pass a raw pointer around everywhere.
I said
> who would write code where you use a single pointer as a global variable and pass it around everywhere, then the borrow checker is acting as a nanny instead of a useful tool.
Logic: if you pass raw pointers -> borrow checker is a nanny not a tool for you -> conclusion: you shouldn't be programming in low level languages.
You: if you pass raw pointers -> conclusion: stick to C/C++.
I can see why Rusters need the compiler to hold their hand considering they don't understand basic logic and have zero reading comprehension.

>> No.63022144
File: 50 KB, 1283x483, 123.png [View same] [iqdb] [saucenao] [google] [report]
63022144

Maybe somebody here uses spring 2.0 with netty? How do I stop netty to print the whole fucking request to the console?

>> No.63022148

>>63021630
Which one is better?

https://github.com/paradoxfm/firefox_njs/blob/master/background.js

https://github.com/idlewan/javascript-control/blob/master/background.js

>> No.63022150

>>63022069
Imagine being as dumb as this person.

>> No.63022174

>>63022012
> If your application is designed properly you will never run into a scenario where you have dangling pointers.
Gee, I guess there are no properly designed non-trivial applications in C/C++.

>> No.63022178

>>63022130
>>63022150
Imagine being so dumb as to have the point fly so high over your head. Let me break it down for you: making retarded counter-assertions is even easier than making retarded assertions; if you want to have a legitimate discussion, try making actual arguments next time.

>> No.63022180

>>63022148
First one is more concise.

>> No.63022208

>>63022178
What assertions did you make in favor of your borrow checker? You basically make no arguments and just made retarded counter-assertions. Everything said so far has been legitimate yet you can't counter it. Sad.
>>63022174
There are plenty. Hundreds of libraries were written in C/C++ that have so far had 0 bugs/errors in them. The badly written ones are what most people hear about.

>> No.63022255

>>63022208
What arguments did you make against the borrow checker? You basically make no arguments and just made retarded assertions. Everything said by me so far has been legitimate yet you can't counter it. Sad.

>> No.63022263

>>63022208
im going to give you an argument as to why devs needed rust. you see mozilla made a web browser called firefox. none of them could code though so it crashed constantly had shit performance and had numerous memory leaks throughout its lifetime. thus mozilla decided to create a safe language so that its coder monkeys could write code without blowing everything up. but its developers did not know how to write a compiler so they had to use llvm a testament as to what type of devs use and create rust. real developers create a compiler or vm from scratch if they need to support a new language, see python java lisp haskell

>> No.63022280
File: 55 KB, 640x640, 1508604763444.jpg [View same] [iqdb] [saucenao] [google] [report]
63022280

>>63021907
unemployed Haskell programmer here

>> No.63022310

>>63022280
Is Haskell a good functional language to learn? Could I write a text parser in it?

>> No.63022311

>>63022263
im going to give you an argument as to why devs needed type systems. you see corporations made some programs. none of them could code though so it crashed constantly had shit performance and had numerous memory leaks throughout its lifetime. thus they decided to create a safe language so that its coder monkeys could write code without blowing everything up. but its developers did not know how to write a real compiler so they came up with C. real developers use assembly

>> No.63022332

>>63022311
False. Assembly isn't a programming language. It's an abstract model of machine code. Failed argument!

>> No.63022339

>>63022310
yes, absolutely

>> No.63022345

>>63022310
I suggest you learn Rust. It's a true functional language unlike Haskell and it also has a borrow checker.

>> No.63022358

>>63022310
Yes. Haskell jobs are great too.
Just ask any of the resident type theorists ITT
200k starting usually

>> No.63022361

>>63022345
lying is rude, even if it's ironic

>> No.63022367

An Email Marketing startup, similar to convertkit

I’ve spent about 3 hours on it so far and made a tonne of progress, basically because I decided not to do any SPA magic and just use server side temaplates, express + Postgres, and maybe sprinkle a bit of jquery.

Technically it’s completely boring but it feels good to make consistent progress without getting stuck somewhere for too long

>> No.63022369

>>63022332
False. I didn't say assembly is a "programming language". I only said real developers use assembly. Failed argument!

>> No.63022370

>>63022358
Sorry, no. Haskell has no jobs unlike Rust. Rust devs are in hot demand and starting salary is around 300k after taxes. No one needs Haskell if Rust provides true abstractions from a functional perspective.

>> No.63022372

>>63022358
>>63022361

>> No.63022391

>>63022370
>300k after taxes
Lol no

>> No.63022396

>>63022369
Not a failed argument..
https://yourlogicalfallacyis.com/personal-incredulity
No logical thinking found in Rust developers' heads. Disappointing!

>> No.63022399

>>63022370
Rust and Haskell are for brainlets who can't handle manually allocating and deallocating memory like real programmers. I use C for all my fizzbuzz programs because I'm a big boy and memory ownership always follows trivial patterns because I design them so well. Use C, numale scum.

>> No.63022410

>>63022370
>rust
>no hkts
>no rank n types
>no polymorphic recursion
>no gadts
>no constraint kinds
>no multi param type classes, fundeps, type families

>> No.63022411

>>63022370
>Rust devs are in hot demand
https://rustjobs.rs/

>> No.63022414

>>63022399
C is for brainlets that can't handle assembly.

>> No.63022420

>>63022372
ok, could you explain then what is a good functional language to learn for a good career? i wanted to try lisp but it has too many braces so am looking at alternatives

>> No.63022424

>>63022396
Failed argument.
https://yourlogicalfallacyis.com/ambiguity
No logical thinking found in Cnile codelet heads. Disappointing!

>> No.63022427

>>63022420
>good functional language to learn for a good career
excel

>> No.63022432

>>63022370
Fuck off C++ false flagger

>> No.63022437

>>63022410
>all other languages
>no borrow checker
>memory leaks 24/7

>> No.63022450

>>63022437
haskell has space leaks but no memory leaks

>> No.63022451

>>63022411
.rs TLD.
proof only serbs use Rust. Probably still salty they lost the yugowars.

>> No.63022465

>>63022410
>static typelets
>no dynamic typing
>no duck typing
>no prototypal inheritance
>no dynamic binding
>need to use language crutches like rank n types, gadts, constraint kids and multi param type classes to work around their language's deficiencies

>> No.63022467

What's up with Rust falseflagging? Are C-tards out of arguments?

>> No.63022480

>>63022411
Easily debunked with a simple google search.

>> No.63022486

>>63022424
const char *s1, *s2; /* strings in the neighborhood */

s1 = Atom_string(s1); /* hash strings to unique pointers */
s2 = Atom_string(s2);

...

if (s1 == s2) {
...
/* strings are guaranteed equal */
...
}


This is C, the real mans programming language. Write this in Rust/Haskell/C++ anything else. Make it as fast as C. Hint.
>you cant

>> No.63022497

>>63022465
>good
>good
>good
>good
>good
>features are crutches

>> No.63022511

>>63021961

I thought endianness was determined by the compiler or something. What does endian-neutral even mean? I thought you're either big-endian or little-endian.

>> No.63022516

>>63022486

let s1 = Atom_string(ss1); /* hash strings to unique pointers */
let s2 = Atom_string(ss2); /* hash strings to unique pointers */
...

if s1 == s2 {
...
/* strings are guaranteed equal */
...
}

This is Rust, the real mans programming language. Write this in C/C++ anything else. Make it as fast as Rust. Hint.
>you cant

>> No.63022524

>>63022480
>Google
>/g/

>> No.63022544

>>63022437
>every program he uses is programmed in something else than rust, most likely C
And still you manage to shitpost, so I think there's no memory leak and you are just retarded shill.

>> No.63022545

>>63022465
>C++
>perfectly safe
>no memory leaks despite having full power of the cpu
>openmp/cpu intrinsics/opengl/opencl/multiprocessing available
>openACC/MPI multiprocessing
>numa aware language
>plenty of compilers to choose from, no monopolies
>free GNU compiler for freedom as in speech
>superior templating
>compile time deduction
>constexpr functions
>turing complete templating system
>safety is a choice not a requirement
>perfect compatibility with C
>easily interface with OS
>fast
>easy
>clean

>> No.63022546

>>63022497
>bad
>bad
>bad
>bad
>bad
>crutches are features
Static typelets can't compete.

>> No.63022550

>>63022467
You mean black flagging, and there isn't any. This is what Rust programmers actually believe.

>> No.63022561

Statically typed common lisp when?

>> No.63022578

>>63022524
...or easily debunked with whatever search engine you think is private

>> No.63022579

>>63022516
Rust shill detected. More empty brain juice instead of an organ.
What types are s1/s2? Are they raw pointers? If yes, and you claim C is unsafe therefore Rust is unsafe too? If not, it cannot be as fast as C because in C all you do is compare pointers.

>> No.63022588

>>63022561
Static typing on Lisp is like spoilers on a lunar lander: Useless and redundant.
Statically typing your code is a premature optimization.

>> No.63022591

>>63022545
this is fact. no one can judge this. rust doesn't even have openMP. in fact if your language lacks openMP it isn't numa aware, and cannot be used for high performance computing.

>> No.63022593

>>63022545
>C++
>completely unsafe
>heavy memory leaks despite, not having full power of the cpu
>poor support for openmp/cpu intrinsics/opengl/opencl/multiprocessing
>poor support for openACC/MPI multiprocessing
>completely numa-unaware language
>3-4 compilers to choose from, all suck
>"free" GNU compiler for freedom as in gulag
>inferior parametric polymorphism (muh templates!)
>compile time is over 9 hours
>constexpr hacks
>unusable metaprogramming facility
>safety impossible even when required
>imperfect compatibility with C
>hard to interface with OS
>slow
>hard
>disgusting

>> No.63022615

>>63022593
every point is false. its impossible to write a program faster than C++.. rust codelets think the opposite

>> No.63022622

Rust programmer here. I use Rust because its inclusive and only facists and old white men use C and C++! Also pointers are hard >:(

>> No.63022624

>>63022588
>Static typing on Lisp is like spoilers on a lunar lander: Useless and redundant
Static typing on Lisp would be as useful as static typing in any other language.

>Statically typing your code is a premature optimization.
Statically typing your code has little to do with optimizations and more to do with correctness.

>> No.63022626

>>63022546
Wrong, faggot

>> No.63022633

>>63022615
every point is true. its impossible to write a program faster than rust... only pluslets think the opposite

>> No.63022656

assignment was valgrind clean when I committed yesterday
now it isn't
well, I don't even now thb

>> No.63022671

>>63022561
That would kinda defeat the purpose of Lisps.

>> No.63022676

>>63022671
you are fucking retarded.

>> No.63022677
File: 62 KB, 639x365, perfomance.png [View same] [iqdb] [saucenao] [google] [report]
63022677

Threadly reminder Rust currently outperforms C++ in the only more-or-less relevant benchmark out there.

>> No.63022680

>>63022671
>That would kinda defeat the purpose of Lisps.
What's "the purpose of Lisps" and how would that defeat it?

>> No.63022681

>>63022633
>>63022626
>>63022624
>>63022622
>>63022593
>>63022550

All Rust shills. Compile time assembly interpreter in perfect C++.
https://github.com/stryku/ctai
Rust cannot do this. You have been defeated. Look at the majesty that is C++.
template <typename code, typename input_t>
struct prepare_and_execute
{
using tokens = tokenize<code>;
using extract_labels_result = extract_labels<tokens>;
using tokens_without_labels = typename extract_labels_result::tokens;
using labels_metadata = typename extract_labels_result::labels;
using tokens_after_labels_substitution = substutite_labels<tokens_without_labels, labels_metadata>;
using opcodes_values_container = assemble<tokens_after_labels_substitution>;
using opcodes_t = opcode::create_opcodes<opcodes_values_container>;

static constexpr auto main_ip = labels_get_ip<labels_metadata, string<'.', 'm', 'a', 'i', 'n'>>;
static constexpr auto memory_size = static_cast<size_t>(400);

using root_thread = thread::create<18, //priority
0, //id
main_ip, //eip
memory_size>; //esp

using memory_t = memory::memory_create<memory_size>;

using machine_state = machine::state<memory_t,
opcodes_t,
tuple_n::tuple<root_thread>,
io::output::buffer<>,
input_t,
0,//time
0>; //thread id counter

using execute_result = typename execute_impl<machine_state>::result;

using result = execution_result<typename execute_result::output,
execute_result::ret_val>;
};
}

>> No.63022690

>>63022677
>posting rigged benchmarks
>>>/v/

>> No.63022698

>>63022681
I'm not a Rust shill you fucking mong

>> No.63022711

>>63022677
The C++ column is shorter than Rust. False flagging shill detected. Minimums and maximums are both smaller than Rust.
Corrected
Threadly reminder Rust currently underperforms C++ in the only more-or-less relevant benchmark out there.

>> No.63022712

>>63022680
>What's "the purpose of Lisps" and how would that defeat it?
To be as dynamic as possible.

>> No.63022722

>>63022690
> la la la *puts fingers in ears* FAKE NEWS

>> No.63022737

>>63022722
literal trump tier post
>>>/pol/

>> No.63022738

>>63022511
The dude talked out of his ass, whenever it comes to raw storage you need to understand, and be aware of, byte order

>> No.63022744

Beginner here
Want to pick up Python because people say it's easy, but other say I should learn C because it makes picking up languages later easier.

>> No.63022753
File: 112 KB, 720x456, map.png [View same] [iqdb] [saucenao] [google] [report]
63022753

Blue is rust, red is C++.
Fact.

>> No.63022760

>>63022677
>I can't read a box plot
Go back to high school.

>> No.63022763

>>63022681
// Anything that works without memory leaks

All C++ shills. Programs that work in perfect Rust. C++ cannot do this. You have been defeated.

>> No.63022768

>>63022516
>>63022579
fn main() {
use std::rc::Rc; // Alternatively: std::sync::Arc
use std::collections::HashSet;

// Speeding up hash collections using custom hash functions
// is outside the scope of this shitpost
let mut table = HashSet::<Rc<str>>::new();

// Defined as a closure so it has mutable access to table
// In a real codebase this would be a struct method
let mut intern = |s: &str| -> Rc<str> {
if !table.contains(s) { table.insert(Rc::from(s)); }
table.get(s).expect("Always succeeds").clone()
};

let s1 = intern("/g/");
let s2 = intern("/g/");

assert!(Rc::ptr_eq(&s1, &s2));
}

>> No.63022780

>>63022712
>To be as dynamic as possible.
What does that mean in concrete terms, and how does type checking defeat it?

>> No.63022795
File: 1.59 MB, 400x221, abandon.gif [View same] [iqdb] [saucenao] [google] [report]
63022795

Oh fuck it's one these rust shill infested threads

>> No.63022802

>>63022744
You learn C, because every other language is pointless. Write this in Python/Rust.
bstring bmidstr (const_bstring b, int left, int len) {

if (b == NULL || b->slen < 0 || b->data == NULL) return NULL;

if (left < 0) {
len += left;
left = 0;
}

if (len > b->slen - left) len = b->slen - left;

if (len <= 0) return bfromcstr ("");
return blk2bstr (b->data + left, len);
}

>> No.63022831

>>63022768
https://github.com/Cyan4973/xxHash
Fastest hashing algorithm available to date.
Written in C.

>> No.63022836

>>63022593
>unusable metaprogramming facility
mad cuz bad

>> No.63022843

>>63022593
>not having full power of the cpu
what did he mean by this?

>> No.63022844

>>63022780
Do I have to spoon feed you the difference between static and dynamic typing? I know you're smarter than a Rust brainlet.

>> No.63022864

>>63022843
Rust shill cannot understand what true programming is.
For anyone who wants to expand intellectual horizons read this http://www.openmp.org/wp-content/uploads/openmp-4.5.pdf

>> No.63022903

>>63022831
Thanks!
use libc::*;

// TODO: Just port it to Rust
extern "C" unsafe fn XXH64(buffer: *mut c_void, length: size_t, seed: c_ulonglong) -> c_ulonglong;

fn xxh64<T>(data: &[T], seed: u64) -> u64 {
// ...
}

>> No.63022908

>>63022844
>completely failing to make an argument
So "being as dynamic as possible" means getting type errors at runtime?

>> No.63022921
File: 161 KB, 1080x1080, qtpie.jpg [View same] [iqdb] [saucenao] [google] [report]
63022921

I'll give you lady candy if you become a real man and use Haskell. Only fart brains use Rust. They cannot grasp functionality over hipsterness.

>> No.63022926

>>63022908
That's a negative. Now look up the positives.

>> No.63022931

>>63022926
What are the positives?

>> No.63022933

>>63022903
>unsafe
not true rust. still uses C.

>> No.63022936

>>63022926
there are none, now fuck off.

>> No.63022950

>>63022926
>That's a negative.
All you have to do now is to explain which of the positives static type checking is inherently incompatible with, and why.

>> No.63022954
File: 228 KB, 850x1103, chad.jpg [View same] [iqdb] [saucenao] [google] [report]
63022954

This is what an average C user looks like. Who would want to look like this amirite

>> No.63022967

>>63021653
No learn C++. Every other language is pointless

>> No.63022971

>>63022954
>The chad Chad
>The virgin Rustlet

>> No.63022975

>>63022933
Good news!
https://docs.rs/twox-hash/1.1.0/twox_hash/
https://github.com/shepmaster/twox-hash#benchmarks

>> No.63022980

>>63022954
An average C user is dead from old age.

>> No.63022982

>>63022931
>>63022936
>>63022950
You're smart enough to think of something positive about dynamic typing on your own.

>> No.63022990

>>63022982
dumb python programmer

>> No.63022994

>>63022982
So you can't name any positives that static typing is inherently incompatible with and explain your reasoning? What a shocker.

>> No.63023004

>>63022982
uhh... less typing?
wait shit type inference exists

>> No.63023018

How do you sort you function declarations? Order of appearance? Alphabetically?

>> No.63023019

>>63022990
>>63022994
>>63023004
I'll give you something to work with. A static type system increases compile type.

>> No.63023023

>>63022954
Nipples like abscesses and a face straight out of a walking dead episode?

>> No.63023035

>>63023019
>doing more operations at compile time makes compilation longer
Okay, but why can't name any positives that static typing is inherently incompatible with and explain your reasoning?

>> No.63023043

>>63023019
....

>> No.63023055

>>63022975
xxHash (C version) is as fast as memcpy. memcpy is as fast as RAM allows. Best perf your benchmark shows is 7.5 GB/s. Dual channel DDR3 is 20 GB/s (roughly on average systems mileage may vary) therefore read/write should get you 10 GB/s. your bench doesn't show this ergo Rust is slower than C.

>> No.63023080

>>63023035
In the end you get a running program. The used type system is irrelevant. You get more safety with a static type system and you get ease of use with a dynamic type system.

>> No.63023088

>>63023018
explain please. what language? show examples.

>> No.63023104

>>63023080
The point is Rust is the ultimate programming language. Rumors say that Intel writes their CPUs with Rust. Chances are that we will write everything in Rust in a few years desu

>> No.63023137

>>63023018
Build a call graph and iteratively remove and process the leaves of the graph. If at any point the graph is non-empty but has no leaves, the program contains recursion and cannot work with static allocation of procedure activation records.

>> No.63023153

>>63023137
In Rust we use modules and don't need archaic call graphs. This is what C++ users deal with on a daily basis. Primitive recursion.

>> No.63023156

>>63023104
Rumors say that Mozilla dies shortly and takes Rust with it.

>> No.63023159

>>63022467
No. It's because then Rust devs are a pack o ESS JAY DUBBAYA devils! Theyz be hirin niggers n shiett ain't feel right down here in the saaoouth of the Nighted state of merca

>> No.63023178

>>63021630
; buscar : list number -> number
; Returns the index of the first element of the list lista that is equal to the number n. If there's none, it returns -1 or false
(define (buscar lista n) (cond
[(empty? lista) ??????????]
[(= (first lista) n) 0]
[else (+ 1 (buscar (rest lista) n))]))


so, the case (empty? lista) its true only when n isn't on the list, it's there a way to make that consecuence to turn the final result to -1 or false?
An auxiliary fuction or double evaluation aren't that clean

>> No.63023191

>>63023080
>You get more safety with a static type system and you get ease of use with a dynamic type system.
Moving the goal posts, I see? Why can't you name any positives that static typing is inherently incompatible with and explain your reasoning?

>> No.63023192

>>63023159
Rust users cannot beat C, therefore they are insecure.
C literally can run on a piece of paper. Thats how lightweight it is. Rust requires 64 GB of ram just for the runtime.

>> No.63023209

>>63023191
No. No one is moving goal posts. Static typing is more safe fact.

>> No.63023228
File: 145 KB, 709x821, rustlet.jpg [View same] [iqdb] [saucenao] [google] [report]
63023228

>>63022467
>What's up with Rust falseflagging?
>being this delusional
Rustlets have been false-flagging in these threads too heavily, to the point of transparency, and now they think they're being clever by false-flagging C false flaggers in a pathetically obvious manner. Why don't you "people" just delete your accounts?

>> No.63023241

>>63023191
>inherently incompatible
Hu? The discussions is about pros and cons of static and dynamic type systems.
Static typing is safer and dynamic typing is easier. It's not rocket science.

>> No.63023243

>>63022310
Text parsers is literally the one task that Haskell is god-tier for. Parser combinators are amazing.

>> No.63023246

>>63023209
>No one is moving goal posts.
Then why are we talking about your subjective opinions about "ease of use" now? I was waiting for you to explain what positives of "being as dynamic as possible" static typing is inherently incompatible with.

>> No.63023260

>>63023228
you cannot admit that C is superior to Rust? are you scared of failure? also there are no accounts on 4chann you kek

>> No.63023276

>>63023241
>The discussions is about pros and cons of static and dynamic type systems.
The discussion was not about that at any point. It's specifically about the statement that Lisp is "meant" to be "as dynamic as possible", and that static typing is somehow incompatible with the "positives" of that.

>> No.63023286

>>63023088
>>63023137
I'm sorry, I meant to ask how you personally prefer to order your function declarations.
Like so:
int foo(void);
void bar(*int);

Do you, personally, order function declarations alphabetically, in order of appearance, or some other way?
Also, at what point do you start dividing them over multiple header and source files?

>> No.63023287

>>63023246
It's not an opinion you idiot it's a fact. FACT. There are absolutely no valid constructs with which dynamic typing is safer. This is fact. Dynamic typing is slower/easier. Static is safer/faster. Facts.Not opinions.

>> No.63023303

>>63022561
>>63022588
>>63022671

Take a look at Lux, it's a statically typed Lisp with a bunch of imspiration from Haskell and SML:
https://luxlang.gitbooks.io/the-lux-programming-language/content/

>> No.63023305

>>63023276
OK, so how would you implement a static type system without destroying macros?

>> No.63023314

>>63023286
Holy shit I actually wrote "*int", I'm fucking retarded.

>> No.63023316

>>63023287
>subjective opinions about what is "easier" are facts
>implying i said static typing isn't safer
Your opinions about dynamic typing being easier are irrelevant.

>> No.63023317

>>63023286
order them according to use case. then alphabetically. so for example
void create_archive();
void delete_archive();

void activate_parser();
void deactive_parser();


separate use cases to individual files.

>> No.63023336

>>63023305
>how would you implement a static type system without destroying macros?
Plenty of options. Can you tell me what aspect of macros is incompatible with static typing?

>> No.63023340

>>63023303
>imspiration from Haskel
so it's shit.
Also nobody cares about ghetto "lisp inspired" languages. They are not standardized. There's like 1 developer. They are pants on head retarded.

>> No.63023350

>>63023316
No, they are relevant since I am the authority with which that opinion lies. You are false flagging and saying its false. It isn't. It is absolutely true.

>> No.63023359

>>63023305
>>63023303
Look at the post above you. Lux has an extremely powerful macro system, and it's statically typed.

>> No.63023364

>>63023303
>written in Clojure
dropped

>> No.63023368

>>63023340
No. Haskell inspired plenty of languages like Rust. Rust is the most used language on the internet. Static typing is easily implementable depending on abstraction model.

>> No.63023386

>>63023359
It looks almost as bad as Rust code.
(type: #rec Infix
(#Const AST)
(#Call (List AST))
(#Infix Infix AST Infix))

(def: (infix^ _)
(-> Unit (Syntax Infix))
($_ s;alt
($_ s;either
(Syntax/map ast;bool s;bool)
(Syntax/map ast;int s;int)
(Syntax/map ast;real s;real)
(Syntax/map ast;char s;char)
(Syntax/map ast;text s;text)
(Syntax/map ast;symbol s;symbol)
(Syntax/map ast;tag s;tag))
(s;form (s;many s;any))
(s;tuple (s;either (do Monad<Syntax>
[_ (s;tag! ["" "and"])
init-subject (infix^ [])
init-op s;any
init-param (infix^ [])
steps (s;some (s;seq s;any (infix^ [])))]
(wrap (product;right (fold (lambda [[op param] [subject [_subject _op _param]]]
[param [(#Infix _subject _op _param)
(` and)
(#Infix subject op param)]])
[init-param [init-subject init-op init-param]]
steps))))
(do Monad<Syntax>
[_ (wrap [])
init-subject (infix^ [])
init-op s;any
init-param (infix^ [])
steps (s;some (s;seq s;any (infix^ [])))]
(wrap (fold (lambda [[op param] [_subject _op _param]]
[(#Infix _subject _op _param) op param])
[init-subject init-op init-param]
steps)))
))
))

>> No.63023387

>>63023364
>Clotrash
>>63023368
>Hasshit
>>63023336
>archaic C macros
>>63023303
>irrelevant kiddie project
>>63023243
>all text editors are written in C none in hasshit.

>> No.63023398

>>63023350
>they are relevant since I am the authority with which that opinion lies
They are irrelevant, because saying that dynamic typing is "easier" for you isn't even an objective pro. I find it easier to reason about statically typed programs, and that makes programming easier for me overall. Now what?

>> No.63023404

>>63023386
the funny thing is you can write that in about 5 lines of C++ code. who the fuck tortures themselves like this is beyond me

>> No.63023405
File: 901 KB, 400x259, abandon2.gif [View same] [iqdb] [saucenao] [google] [report]
63023405

>>63023368
Rust shill filled thread

>> No.63023419

>>63023386
HOLY FUCKING SHIT THATS UGLY WHY WOULD ANYBODY MAKE LANGUAGE LIKE THAT?

>> No.63023423

>>63023359
If anything, static typing with good type inference only makes macros better since sexpressions are typed.

For example, Lux's if macro (which is not a primitive) will check at macro expansion time that the first input is a boolean, and that the other two inputs have the same type. If it doesn't typecheck, it will throw a human-readable error.

>> No.63023424

>>63023398
You are a bad programmer, I am a good one. That's the conclusion and this conversation is over. Also check your whataboutism.

>> No.63023425

>>63023404
it's almost like different langs have different advantages

>> No.63023426

>>63022921
i already use Haskell

>> No.63023434

>>63023426
that's because you're a virgin and got baited. never fall for bait.

>> No.63023442

>>63023368
Rust shills are getting dumber by the day.

>> No.63023448

>>63023425
it's almost like functional programming is trash.

>> No.63023453

>>63023387
>>63023424
Literally not an argument. Still waiting for someone to explain what positive aspects of the dynamism of lisp static typing is incompatible with.

>> No.63023467

>>63023453
You conceded when you couldn't defend dynamic typing. Static typing is objectively superior.

>> No.63023469

>>63023448
>Lisp
>FP

>> No.63023475
File: 103 KB, 680x376, 1484000142947.png [View same] [iqdb] [saucenao] [google] [report]
63023475

>>63023434
>>>you should use haskell
>>i already use haskell
>HA! BAITED!
u got me

>> No.63023477

>>63023404
>the funny thing is you can write that in about 5 lines of C++ code
The funny thing is that you don't understand what any of that code is doing. Another funny thing is that the opposite of your statement is true 95% of the time.

>> No.63023490

>>63023404
No you can't. It's a hygienic macro, C++ does not have macros.

>>63023386
Dude, the example you picked is a macro that recursively transforms all sexpressions inside it into infix syntax. Your objection is only valid if you can show me a common Lisp or Scheme macro with the same spec that is substantially shorter.

>> No.63023493

>>63023469
Lisp is functional you fucking autist. Don't bring up that hipster trash Rust or Haskell, both copied Lisp and are unreadable.

>> No.63023494

>>63023453
Keep fishing, faggot.

>> No.63023515

>>63023477
I understand it perfectly. Implementable in C++ in 5 lines of code no libraries
>>63023490
C++ has plenty of macros. #define constexpr templates etc.

>> No.63023518
File: 40 KB, 546x317, mccarthy on lambda calculus.png [View same] [iqdb] [saucenao] [google] [report]
63023518

>>63023493
>Lisp is functional
This meme again.

>> No.63023548

>>63023518
post a comment from an irrelevant wannabe thinking it matters. what did he accomplish if anything? lisp is provably functional, haskell is provably unfunctional.

>> No.63023557

Java. Are variables like _positionX not visible in public Circle?

public Circle(java.awt.Color color, int width, int heigth, int x, int y){
_circle = new Ellipse(color);
_circle.setFrameColor(java.awt.Color.black);
_circle.setSize(width, heigth);
_positionX = x;
_positionY = y;
_startingCircleWidth = width;
_startingCircleHeigth = heigth;
this.setLocation(_positionX,_positionY);
}

public Circle(java.awt.Color color, int width, int heigth){
_circle = new Ellipse(color);
_circle.setFrameColor(java.awt.Color.black);
_circle.setSize(width, heigth);

this.setLocation(_positionX + (_startingCircleWidth / 2) - (width / 2 ),100);
}

>> No.63023575

>>63023557
You'll have to check their declarations for that.

>> No.63023579

>>63023548
>surely someone will fall for this

>> No.63023581

>>63023386
>recursively transforms all sexpressions inside it into infix syntax
>Your objection is only valid if you can show me a common Lisp or Scheme macro with the same spec that is substantially shorter
I can't parse that horror. What does it actually do? Legit infix expressions, or something like (+ 1 (+ 2 (* 3 4))) => (1 + (2 + (3 * 4)))?

>> No.63023588

>>63023557
you are doing OOP. don't. any language that has OOP is garbage. i suggest you try C. In c this would be.


struct circle { int positionX; int positionY; };
int main()
{
circle.positionX = 1;
}

>> No.63023604

>>63023588
>can't even write correct C
how pathetic

>> No.63023609

>>63023557
It's declared like this right above first Circle.
public class Circle {
private Ellipse _circle;
private int _positionX, _positionY, _startingCircleWidth, _startingCircleHeigth;

>> No.63023611
File: 6 KB, 200x200, my-sides.jpg [View same] [iqdb] [saucenao] [google] [report]
63023611

>>63023515
>I understand it perfectly.
https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
Provide the equivalent 5 lines of C++.

>> No.63023618

>>63023579
> surely you will quit memeing that lisp isn't functional because some demented dead guy said so 1 year before his death
lisp is actually functional. look at its syntax.

>> No.63023642

>>63023609
>private int _positionX
Seems we have our answer.

>> No.63023660

>>63023611
Sure simple
#include "infix_parsing_library.hpp"
int main()
{
std::string expression;
std::cout<<"Enter Infix Expression \n";
getline(cin,expression);
std::string parsed =
infixParser(expression);
cout<<"Output = "<<parsed<<"\n";
}

>> No.63023676

>>63022933
While you're correct that it still uses C, your claim that its "unsafe therefore not true rust" is completely ridiculous. unsafe is the ISOLATION of unsafe programming, therefore keeping it in line with the safety guarantee provided by Rust.

>> No.63023681

>>63023611
I'm not going to waste time writing code for an archaic dead language. No one would need to write that for a C++ codebase in their entire life. This is proof Lisp is garbage-tier and must be removed from textbooks.

>> No.63023698

/wdg/ here.

I started learning Python last night.

Is there anything that will make my life easier when it comes to parsing JSON from APIs?

Currently using 'requests.get()' and just foreaching or 'for this in that'-ing the .json()

>> No.63023705

>>63023698
don't use that trash, use C. yes use rapidjson much faster and cleaner.

>> No.63023726

>>63023611
Explain to us what that code does then. Also, using ad hominems means your argument auto-fails.

>> No.63023741

>>63023604
that's correct C. show me where its wrong.

>> No.63023766
File: 589 KB, 652x1024, 1504644167230.png [View same] [iqdb] [saucenao] [google] [report]
63023766

>>63023618
>lisp
>syntax
This meme again.

>> No.63023787

>>63023518
Depends on which lisp you are talking about. Lisp is a family of languages, not a single language.

Also, all the ML/Haskell family pure functional languages nowadays are arguably just Lisplikes with fewer parentheses and no macros.

>> No.63023799

>>63023766
>lisp
>unfucntional
this mem agan

>> No.63023804

>>63021911
instead of trying to drag everyone down you could try harder, but nope
can't understand it so it's for "javascript brainlets"

>> No.63023811

>>63023787
They aren't lisplikes at all you moron

>> No.63023815

>>63023787
all lisp is functional. haskell isn't because it has variables. lisp supports sexpressions. because ts functional. haskell doesnt.

>> No.63023825

>>63023660
>>63023681
>can't do it
>gets mad and starts to shitpost

>> No.63023834

I have one more question about Python.

I have to run an infinite loop to continually check for updated json every 5 seconds from the API.

I also have to run an infinite loop to go through a queue array on a variable timer (queue array contains sleep time).

Is this where threading comes into play? I just contain the while True loops in their own function, then do something like:
thread_one = threading.Thread(target=first_function)
thread_two = threading.Thread(target=second_function)
threads.append(thread_one)
threads.append(thread_two)
thread_one.start()
thread_two.start()

?

>>63023705
I'm using it with a raspberry pi.

The wiringpi library is too easy to pass up.

>> No.63023836

>>63023811
thats true. they're lisp clones who fail at being functional.

>> No.63023852

>>63023836
You're a moron

>> No.63023853

>>63023787
>the ML/Haskell family pure functional languages nowadays are arguably just Lisplikes
How much a close-minded cultist have you to be to see every language as a variant of your favorite one?

ML/Haskell is nothing like Lisp, mostly because 1) They are actually based on Lambda Calculus and Type Theory, while lisp is based on nothing 2) They are statically typed, while Lisp makes a point in being dynamically typed 3) Haskell is actually pure, and Lisp is a mess with optional lexical scoping.

>> No.63023857

>>63023834
that's correct. threading has to be safe so make sure you dont get concurrency checks.
>>63023825
can you explain what your code those then? youre samefagging and shitposting without remorse. yet real discussion is curbed. also responding to yourself lol

>> No.63023873

>>63023853
> Lambda Calculus meme
pointless no CPU can do lambda calculus natively
> type theory
C is statically types, much better than dynamically types functional languages
> Haskell is actually pure
no it isn't its abstracted by using autistic recursion. also it isn't statically typed.

>> No.63023874

>>63021630
I can't seem to go past the beginner stage. I know the basics inside and out, but I have never managed to write some actually relevant piece of software. Hell, I can't even seen to get a nice idea. How do I progress to the next step?

>> No.63023884

>>63023874
make sure to use C and not autistic lisp. /g/ will tell you to use lisp but don't listen. its a pointless language built for a system 70 years old. also the main backers of lisp are demented old men srs

>> No.63023888

>>63023857
>make sure you dont get concurrency checks
Haven't heard of this. Thanks.

>> No.63023901

>>63023853
> mad cuz lisp is better than haskell
> muh lambda calculus
Calculus is pointless outside of say game engines. Any language that tries to handle it fails because you don't need calculus for a database.

>> No.63023918

>>63023901
True. +1

>> No.63023942

>>63023901
Agree. Although it's not absolutely correct; you can use calculus in theoretical physics; calculus is pointless for most developers. Lisp and company try to handle it but fail miserably.

>> No.63023954

>>63023857
>>63023726
Transforms infix expressions into s-expressions. The C++ equivalent of this would be something like:
int a, b, c, d;
int x = transform((* (+ a b c) d)); // -> gets converted into int x = (a + b + c) * d at compile time

Show me your 5 lines of C++ that would accomplish this, because I'm pretty sure C++ can't do this at all, not even with disgusting TMP.

>> No.63023973

>>63023874
Start working on a project. Pick a project that you find interesting and isn't too hard. Is there something you can automate? What are you interested in learning?

>> No.63023978

>>63023901
Lambda Calculus != Calculus, they have almost nothing to do with eachother (to the extent that this can be true for math, it's all related to eachother somehow through category theory).

Agreed that calculus isn't useful for most things that most people will want to write.

>> No.63024008

>>63023954
This is what lisp programmers deal with. This is what dynamic typing gets you. Fucking embarrassing. This is like saying
void bla(void);
//must be converted to
bla () void void;
// so that the compiler understands it.

holy shit i dont understand why anyone uses this archaic crap.

>> No.63024034

>>63023978
> can't defend lisp
> try to invoke defence by unproven noname theory
how is this relevant to the discussion? who needs this? why? lisp is provably slower than Rust. why use lisp with ((CALCUILUIS)) when i can use a sane modern language?

>> No.63024045

>>63024008
>can't do it because C++ isn't powerful enough
>gets mad
>more shitposting ensues

>> No.63024059

>>63024045
C++ can do it. theres just no point in spending 2 weeks writing useless crap. C++ templating is turing complete thus can do anything. proven.

>> No.63024111

>>63024008
LISP requires code reevaluation because depending on if it's infix on s expression you get different results. It stems from Euclid's postulates. Just in case anyone is interested in why they are using this code.

>> No.63024140

>>63024111
Never heard of this could you explain more? Why does lisp do this??

>> No.63024146

>>63024059
>theres just no point in spending 2 weeks writing useless crap
So it would take 2 weeks to accomplish in C++? I thought it'd take 5 lines.

>C++ templating is turing complete thus can do anything
Then make it print the value at a given memory location. What's that? You can't? Don't use terminology you don't understand, kid.

>> No.63024165

>>63024111
>>63024140
Obvious samefagging.

>> No.63024170

>>63024146
You absolutely can do that.

>> No.63024173

ok

>> No.63024187

>>63024165
I agree, why would anyone samefag on an anonymous forum is beyond me. Fucking pathetic.

>> No.63024196

>getMonth() in javascript is zero indexed

>> No.63024200

>>63024034
I'm not defending lisp, I was just pointing out an invalid argument (not quite a strawman, just misidentifying the subject matter entirely). If you want to hate on lisp then talk about it's many flaws, but don't try to invoke math as an argument if you don't understand it.

>> No.63024217

>>63024140
LISP is a language rooted in lambda calculus. It's quite complex but to make it simple it revolves around drawing lambda curves within given dimensions. Hence S-expressions. This allows code that is effectively both data AND instructions to be packed in a single package. The need for reevaluating code is due to LISP interpreters handling infix notation as an explicit instruction and not as data. Hope this helps.

>> No.63024240

>>63024200
I actually find lisp to be quite a cool language and am thinking about learning it. No idea why /g/ hates it so much, looks powerful.
>>63024217
Any idea where I can learn more about this? Honestly have no idea about lisp and would like to learn it in the future. Any good materials to learn from?

>> No.63024246

http://collabedit.com/vnkym

Why doesnt my code work?

The single classes work seperately but the DateTime Class where I try to put them together doesnt work

It printss 000000 and another spooky shit

>> No.63024258

>>63024196
That's idiotic

>> No.63024272

>>63024240
Make common lisp great again

>> No.63024279

>>63023954
are you retarded? this simply isn't applicable in C++ because that syntax is not valid in C++. are you knocking C++ for not being able to define a function which takes as input (or gives at output) invalid syntax? kek

however, you certainly could define a function which does this conversion on a literal value containing source for some DSL your application uses (which we'll assume does support both prefix and infix syntax). and yes, at compile time (as long as the input is indeed a literal/constexpr value)

>> No.63024287

>>63021863
Her tone sometimes throw me off.
Listen at 0:18
> "This might not be the best thing to do"
Don't say it like that, be confident. It's not the best thing to do. It's a quick dirty hack.

>> No.63024290

>>63024170
>You absolutely can do that.
Show us, faggot.

>> No.63024291

>>63024217
>> LISP is a language rooted in lambda calculus.
That depends a lot on the dialect. Some empathize the lambdas more than other.

Also, Lambda is just short for "anonymous function" in other languages. The real bit of extra power that lisp had over other early languages wasn't so much the fact that it had anonymous functions, as opposed to the fact that it had closures.

>> No.63024308

>>63024240
Depends on whether you want to learn LISP or the theory behind LISP. It's a bit like the C Programming Language in that you can learn C, but if you don't understand the machine below the language you won't be able to code properly. Same with LISP. LISP is like a language within a language, and the extensive use of categorical theory is definitely shown.
So, my advice would be to first learn math in order to understand the 'background' of LISP.
A good starting resource would be https://www.amazon.com/Algebra-Graduate-Studies-Mathematics-Martin/dp/0821847996/ref=sr_1_1?ie=UTF8&keywords=isaacs+algebra&qid=1375369062&sr=8-1.
If you want to learn pure LISP, as a functional language just start coding. Purely functional language are a product of your imagination and there are no concrete idioms to follow.
If you want to learn functional LISP, as a productively abstract language, I suggest https://www.cs.cmu.edu/~dst/LispBook/.
This is how I started a few years ago and my life changed drastically.
Also many other languages 'borrow' from LISP, such as the Rust borrow checker, or C++ templating systems. They both stem indirectly from lambda calculus and control theory.

>> No.63024332

>>63024291
Strongly disagree. Lambdas in LISP, and Lambdas in other languages are nothing alike. Closures and actually imperative to functional programming, and wielding LISP properly. C++ has lambdas yet without closures they are as useless as a brick.

>> No.63024335

>>63024279
>b-b-but it's inapplicable in C++ because it's not valid syntax
Infix syntax is not valid lisp syntax, yet you can easily deal with it in a lisp. It's inapplicable in C++ simply because C++ doesn't have any powerful metaprogramming facilities. You went pretty quickly from "5 lines" to "it's impossible b-b-but it's inapplicable!"

>> No.63024344

>>63024217
>LISP is a language rooted in lambda calculus.
false

>> No.63024364

>>63024308
Interesting. Will see about this. I'm still not sure whether to pursue this myself. It seems a bit of a sharp learning curve since I'm still on python tier stuff. lisp looks sweet though.
>>63024290
I don't know any C stuff, but I'm almost certain it can do that.. C++ can run assembly at compile time so it can certainly print memory too. You'll have to find someone who knows C though.
See: https://github.com/stryku/ctai (posted earlier)

>> No.63024384

>>63024279
The idea is that Lisps let you implement arbitrary syntax and language constructs in the language itself.

For example, C++ users had to wait 34 years for constexpr if to be added to the language. In languages with proper lisplike macros, you can just implement any language construct like that using macros, and it will feel just as natural to use as the built in constructs.

The infix macro is just an example of a macro you can write yourself which is commonly given out as an exercise, much like say making your own shortcircuiting and/or operators. Macros can do much more than that.

>> No.63024387

Been playing around with Julia.

It's great. It has a very Lua or Matlab-like syntax, but under the hood it's a lisp-1 (parsed into S-expressions, has lisp macros). It uses LLVM as a backend. Functions are polymorphic over types, which get JIT-ed into type specialized functions, so it runs almost as fast as C. The GC isn't terrible. The FFI is amazing--you can call Fortran or C (or anything using the C ABI, so everything important) just like any other functions... C++ calls get cross-language inlining.

And then they go and fuck everything up with 1-based array indexing.

>> No.63024396

>>63024364
You should learn LISP. Most regular programmers simply don't try but LISP isn't about programming it's about understanding the theory BEHIND the language. Lambdas in C++ exist because of LISP. Recursiveness was effectively invented in LISP. The concept of a stack stems from stack theory (form of LISP indirection; LISP uses closures for this et. al.).
You MUST learn LISP if you want to delve into advanced computer science.

>> No.63024417

>>63024396
Lisp hasn't been seriously used in the actual CS in the last 30 years or so.

>> No.63024420

>>63024387
Julia is truly a work of art. It's very high level yet works with low-level constructs PERFECTLY. I still haven't seen a single language do that.
Plus it has fully functional LISP macros and the ability to call direct C code. In a few years I see this language being the heart of any scientific or mathematical research. But alas it doesn't stem all of it's theory from functionality of lambda calculus, which honestly makes some code rather ugly to see. Looking forward to the future.

>> No.63024432

>>63024364
>I don't know any C stuff, but I'm almost certain it can do that..
So you can't do that either. Anyway, it's obvious to anyone who isn't a retard that C++ simply can't do lisp-like metaprogramming because it gives you no access to the AST, and even if it did, it would be nearly impossible to work with. Being Turing-complete doesn't mean jack shit in this context.

>> No.63024440

>>63024396
>You MUST learn LISP if you want to delve into advanced computer science.
MIT uses Python nowadays for CS.

>> No.63024459

>>63024417
>>63024440
>responding to the complete autist who alternates between Rust baiting, sepples baiting and Lisp baiting
He does this every day. How new are you?

>> No.63024464

>>63024417
It has. In order to write a proper C compiler you have to use LISP. Fundamentals of computing state that without original recursion paired with corecursion you cannot parse a true C source file.
Thus the first C compiler user a LISP like back end to parse the fix-rotated source B-tree. Also, most C constructs, like Integers, Floats, Preprocessor stem directly from self-referential data structures which are ROOTED in LISP theory. Most LISP is seriously taught but sadly it's akin to looking at code through a looking glass.
Students learn what something is, but not the origins. I wish full LISP classes returned to universities.

>> No.63024476

>>63024459
Seriously, they do this every single day. Every time these fucking false flaggers show up and start fucking over every board. If you intend to shitpost reddit is that way ->

>> No.63024489

>>63024476
Actually it's the same fucking autist doing this. He gets tons of respones too which makes it fucking pathetic. /g/ tier threads for real.

>> No.63024503

Tripcode generator. Used an example tripcode that generated in like 5 seconds. Next I'm going to make a pomf clone

>> No.63024518

>>63024387
>>63024420

Agreed. Imho, while lisps with lisp syntax are interesting, I definitely prefer languages like Julia and Elixir which give you lisp macros without going full on autist with lisp syntax. Just a syntax simple enough that you can easily guess what the parse tree looks like.

It also has multiple dispatch which is another nice feature from common lisp, along with a good type system that is built to work well with the multiple dispatch system. It ends up mixing the advantages of dynamic typing with some of the advantages of static typing in a way that I haven't seen before.

>> No.63024528

>>63024187
>>63024476
>>63024489
>>63024464
>all that autism coming from a single poster
It's really transparent.

>> No.63024530

>>63024440
Python is basically a LISP rewrite though. Interpretation without compilation is impossible to achieve without access to the AST.
Depending on if your language is a B-tree, or an positional bi-diagram, different theories can apply. LISP is a lambda S-expression while Python is a full blown bi-directional interpreted C-expression (closed expression). The AST is slightly different but mostly similar to that of LISP.
>>63024335
Wrong. C++ is true infix notation since all valued operators follow operational logic. See.
int function(int x) { return x; }

>> No.63024545

>>63024420
>>63024518
I'm looking forward to the next generation of languages. I'm imagining something with Julia's dispatch and macros, the ability to do Rust-like ownership tracking (optionally--the way Julia makes type stability optional, as a performance optimization that you do after you get your code working), and Go's take on concurrency/parallelism.

>> No.63024564

>>63024545
>i want an incoherent mess that tries to do everything and be everything
Nobody needs a next-generation sepples.

>> No.63024565

>>63024503
Tripcodes are tricky to pull of, and if you are seriously wanting to delve that deep into computational theory, I suggest you try Clojure.
You cannot pull off a fully transparent functional style, but you can open algebraic equations which allow you dissect the AST without recursion.
>>63024518
True. Type systems are something most languages simply ignore. Julia has extremely potent potential, and it's already being used in quite a few places.

>> No.63024574

>>63024530
Python has a really ugly parse tree, so giving it decently powerful lisp macros is pretty much a lost cause.
>>> parse("2 + 2")
['eval_input', ['testlist', ['test', ['and_test', ['not_test', ['comparison',
['expr', ['xor_expr', ['and_expr', ['shift_expr', ['arith_expr', ['term',
['factor', ['power', ['atom', [2, '2']]]]], [14, '+'], ['term', ['factor',
['power', ['atom', [2, '2']]]]]]]]]]]]]]], [4, ''], [0, '']]

>> No.63024584

>>63024387
Is Julia useful for anything beside number crunching?

>> No.63024592

>>63024564
No, but languages which unravel the AST bidirectionally are needed. We have too many C clones, which fail to use proper S-expressional geometry under the hood.
I get that imperative languages are needed, but considering that multi dispatch type systems are sought after more and more we need languages that can cast macros in a better light.

>> No.63024615

>>63024574
Frankly, I never bothered with Python, mainly because it was over engineered. That parse tree contains primary tier expression which ought to be separate functions, potentially even inlined. But it's quite useful at what it does.
Macros are another beast, since without Lambdic overloading you can forget a coherent macro type system.

>> No.63024629

>>63024584
Yes, you can do machine learning, or statistical analysis. Both use cases are growing, but due to it having higher dimensionality under the typed access you can even write parsers quite efficiently.

>> No.63024644
File: 80 KB, 640x640, get-well-soon.jpg [View same] [iqdb] [saucenao] [google] [report]
63024644

>>63024565
>>63024592
>>63024615

>> No.63024645

>>63024565
> tripcodes are neccessary for a good language
> good meme rite guys
this is what these fucking autists want. rust doesnt fucking need algebra lambdas or fucking tripcodes. true functionality lies in compile time pattern mathcing

>> No.63024671

>>63024644
I don't understand. Explain?
>>63024645
Rust lacks numerical lazy evaluation. Everything is statically types which causes buffer intrications. Not to mention the speed with which the compiler parses is atrocious. By the time you appended the AST with the bidirectional flow chart you already removed any const-guarantees you had. C did this right, and LISP does it truly great.

>> No.63024684

>>63024671
no one uses rust, every one fucking uses rust. its the most loved language for a reason. no fucking shit that lambdas are overused. C++ tried them and failed. functionality is pointless, compile time safety is what people need

>> No.63024716

hey im working on balacing a postfix B-tree into a pure S-expression infix rated at a 5th degree. possib;e?

>> No.63024719
File: 30 KB, 800x392, AAEAAQAAAAAAAATxAAAAJDc4ZDgyODVlLTRhYzUtNDU5Yy04MWM4LTUwOGRlMTY4MDQ4Zg.jpg [View same] [iqdb] [saucenao] [google] [report]
63024719

Can it be we're actually witnessing an AI in action itt? The posts like >>63024671 lack even basic coherency and look automatically generated.

>> No.63024734

>>63024716
Not without LISP. LISP can access the AST immutably and edit the irrationality while guaranteeing that memory layout is the same.

>> No.63024754

>>63024719
holy fucking shit you think someone uses an AI for fucking /g/?
go back to /pol/ conpiratard

>> No.63024764

>>63024719
Nah, it's legit autism.

>> No.63024863

this wonderful thread is dead?
why? i thought people loved circkljercing lisp rite?
rite? maymay

>> No.63024886

>>63024863
posters are mad cuz bad.
> rust btfo
> haskell btfo
> c++ btfo
> lisp decidedly purely functional
no one can comment because they all were btfo

>> No.63024895

>>63024754
>holy fucking shit you think someone uses an AI for fucking /g/?
>implying they have anything better to do

>> No.63024908

>>63021881
The borrow checker doesn't have anything to do with linear/affine types.

>> No.63024927

>>63021839
It usually does, e.g. in C++ it's hard to have situations where it's even possible to do a tail call because of destructors.
Theoretically you may be able to free all resources except for the ones passed as arguments, then call the function, but I don't think C++ or Rust do this

>> No.63024930

>>63024886
Everything sucks!

>> No.63024940

>>63024908
The borrow checker is derived through pure algebraic lamdbic theory. Lambda operations are preserved through immutability of state. LISP preserves the AST B-Tree perfectly. The borrow checkers can indent the AST nodes slightly signalling a borrow has occurred. If any or all nodes are not linked with a single algebraic neighbour (category theory) then the borrow no longer exists and if it's used then code is unsafe. Pure LISP jargon.

>> No.63024944

>>63024927
Do C, C++ or Rust implementations typically offer support for tail recursion optimizations?

>> No.63024958

>>63024335
>You went pretty quickly from "5 lines"
that wasn't me

>C++ doesn't have any powerful metaprogramming facilities
C++ has plenty of powerful metaprogramming facilities, it just doesn't go so far as letting you define your own syntax because that's a ridiculously fucking retarded idea. in practice, it causes a shitload of arbitrary syntactic variation across codebases, allowing source picked from any given one to be potentially incompatible with any given other. in other words, it effectively makes the language's syntax weakly defined, which is a logistical nightmare. it's neat for a toy language but that's about it

>>63024384
see above. there's a reason why C++ doesn't support this, and why C++ projects avoid even the comparably simple macros supported by the C preprocessor wherever possible. arbitrary/syntactic macros are bad language design. it is unfortunate constexpr took so long to come around, but semantically-aware metaprogramming is a much, much better idea

>> No.63024964

>>63024344
It is though isn't it? There are two ways to Turing complete; Turing machine and Lambda Calculus. Most CPU architectures are based on Turing machines, and so are most programming languages. Which was why lisp is so inefficient compared to other languages.
Sorry if this is wrong, I don't have autism. Only asperger.

>> No.63024965

>>63024944
Yes, quite advanced, but it's not guaranteed like in Haskell or Scheme.

>> No.63024966

>>63024944
No. Long tail recursion require mathematical corecursion which only abstract functionality can offer. C fails, C++ can sort of achieve it via templating, but Rust has the borrow checker which prevents organization homeopathic types by origin. So no. None of them have it.

>> No.63024981

>>63024944
Technically GCC/Clang offer it as an "optimization" under very specific circumstances if you cross your fingers, but it's extremely unreliable

>>63024940
I don't think this is how that works

>> No.63024997

>>63024965
Incorrect. Haskell isn't purely functional since lambda calculus is in achievable due to static displacement from lack of macros.
>>63024958
Incorrect. C++ is statically typed, and dimorphically generated which means the AST cannot be defined. In order to define a syntax you must have lambdic access to the tree nodes. C++ doesn't allow this due to const corectness. constexpr is an exception.

>> No.63025008

>>63024964
>t. doesn't know shit about computation

>>63024997
>>63024940
Please ban this markov-chain-poster

>> No.63025012

>>63024545
GHC Haskell is getting optional linear types this year, so it'll have a capability similar to Rust's borrow checker, which will make it possible to reduce stress on the GC by not producing garbage.

Lots of people are looking forward to it because the Haskell GC can be a PITA when writing anything with soft real time constraints such as games. I'd imagine that the lambdacube guys are really happy about it.

>> No.63025033

>>63025008
You cannot fathom the intelligence with which I live so you must stutter like an impotent drool. I bet you can't even compute a markov chain from a dimorphic tree even if I gave you the source code. Everything I said was true, LISP is truly functional, because just types and static types create abstract options.

>> No.63025035

Linear types traditionally doesn't have borrow checking of any sort.

Cyclone's type system uses regions and effects, which Rust's borrow checking is almost entirely based on. Cyclone does this without linear types.

If you didn't know either of these things, please stop opining and spreading misinformation about linear types and the borrow checker

>> No.63025051

>>63025012
No. Haskell LACKS ORIGINATION. How can you know which types is ordered correctly without analyzing the co restraints of the node placement? You cannot thus the dilated operativity is gained through the GC.

>> No.63025063

>>63024964
Assembly doesn't look much like turing machines or the lambda calculus. It's it's own thing (von neumann architecture).

Lots of different things are turing complete. For example, the act of measuring an arbitrary quantum state in different orders is turing complete since you can use the process to compute an arbitrary computable function.

>> No.63025074

>>63025035
This was already said. Please read my other posts to inform yourself on why this is the case. And please refrain from monotonous shitposts.

>> No.63025082

>>63025063
No. Turing completeness only specifies the originality. Von Neumann reflects density.

>> No.63025097

>>63025082
HOLY FUCK. i just remembered my math classes in senior year. von neumann allows for lambdic overloads yet turing completeness permits macro redefinition in a finite scope

>> No.63025104
File: 86 KB, 525x700, 1502811262223.jpg [View same] [iqdb] [saucenao] [google] [report]
63025104

how do i actually improve at programming
i've been programming c and c++ for about two years now semi-regularly, i feel like i can do pretty much all i need albeit inefficient and ugly
but i feel i've been stuck in the same shit for a year
how do i actually learn to and start using stuff like templates, atomic variables, proper class implementations, threading, or whatever else is available?
any good stuff i can read to actually help me get a hang of proper code standards and shit like that?

>> No.63025113

>>63025097
exactly :) my point proven

>> No.63025117

>>63024997
>Incorrect. C++ is statically typed, and dimorphically generated which means the AST cannot be defined
what are you talking about? this has nothing to do with what i said. i didn't say C++ lets you define arbitrary syntax; i specifically said it *doesn't* and that it would be a terrible idea if it did. actually read something if you're going to reply to it, dumbshit

>> No.63025128

>>63025104
Learn Lambdic algebra to understand atomic structures. An atomic operation can only take place if a thread is within a Non Reudigg state. If it is operating on data the mutexical bind fails to hold.

>> No.63025140

>>63024958
>C++ has plenty of powerful metaprogramming facilities
What is it powerful compared to? C macros? No meta-programming? Clearly not compared to lisp-like meta-programming facilities, given that it can't do even a tiny fraction of that.

>letting you define your own syntax because that's a ridiculously fucking retarded idea
You mean letting _you_ "define your own syntax" (if you really want to call it that) is a ridiculously retarded idea, because you're just a code monkey. You should probably stick to Java.

>in practice, it causes a shitload of arbitrary syntactic variation across codebases, allowing source picked from any given one to be potentially incompatible with any given other
This is a load of nonsense.

>> No.63025147

>>63025117
Correct :) It's because the AST DOESN'T PERMIT IT. But if it did, it could cause structucal error regarding OOP and standardization.

>> No.63025168

>>63025140
It's powerful compared to LISP. The Trees it has cannot be arbitrarily loaded with const-corectness. C++ allows this, and with atomic binding no lesss.

>> No.63025171

New thread:
>>63025156
>>63025156
>>63025156

Please leave shitposting in this one.

>> No.63025182

>>63025168
No. I specifically said it _isn't_. In order to be stronger than LISP it has to be loosely defined. It isn't. LISP is nothing more than a playground of ideas. A toy box.

>> No.63025205

>>63025182
>responding the the autistic baiter
>failing to make any kind of argument
So this is the power of the sepples monkey.

>> No.63025261

>>63024958
But lisp macros ARE semantically aware. They *have nothing to do* with C preprocessor macros. They are less likely to break things than C++ template metaprogramming, which is much, much harder to work with and randomly creates incomprehensible thousand line error messages due to simple errors.

Learn some lisp dialect to get a feel for how lisp macros work and how they are used before commenting, please.

>> No.63025525

>>63025104
Get a job. I'm serious. You'll improve

>> No.63025588

>>63025525
how can i improve without getting a job

>> No.63025639

>>63025588
Dunno, read about programming design, data structures, algorithms. Apply them in some big project. Start committing to an open source project, esp. one that has standards and that will make you change your shit code (the cult of OpenBSD comes to mind). I'm working on the first part (design etc) now myself.

>> No.63025662

>>63025140
it's as powerful as C++, because it literally is just C++ (with the obvious necessary limitations regarding side effects). regular, powerful, syntactically strongly-defined C++

>You mean letting _you_ "define your own syntax"
no, i mean *you*, and all the other thousands of autists who maintain their own personal flavor of [insert lisp-like language] while never having made a nontrivial real-world application

>This is a load of nonsense
no, it's a real problem and without a doubt a significant contributing factor as to why lisp-like languages are not used anywhere near as much as they obviously could be in theory

>>63025147
>Correct :) It's because the AST DOESN'T PERMIT IT
and this doesn't matter because IT'S A BAD IDEA ANYWAY. you have a serious problem with selective reading/comprehension

>>63025261
>But lisp macros ARE semantically aware
yeah, but... what semantics? that's not saying very much

>> No.63025683

>>63025639
ok thanks
ill look into contributing to something
or at least adopt the style of an already established project maybe

>> No.63026060

>>63023642
Oh shit. I'm retarded.

>> No.63026238

>>63025662
>it's as powerful as C++
And yet it can't do even a tiny fraction of what you can do with Lisp macros, so what is it powerful compared to, again?

>no, i mean *you*
Clearly, you mean retards like yourself and everyone you know, because you're the one who can't conceive of not abusing Lisp macros to create your own ad hoc language. Competent programmers use them for productive purposes.

>no, it's a real problem
No, it's an imaginary problem that stems from your inability to comprehend how Lisp macros can be used productively.

>without a doubt a significant contributing factor as to why lisp-like languages are not used anywhere near as much as they obviously could be in theory
Yes, the existence of code monkeys like you (and the need to cap the amount of damage they can do in a project) is definitely a "contributing factor", if not the main factor.

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Password [?]Password used for file deletion.
Captcha
Action