arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1497259937130.jpg (1.79 MB, 4201x3001, Toronto-KingSt-Datacenter-….jpg)

 No.215[Reply]

artificial intelligence
requested

beginner programming questions
>>1014

C
>>882

C++
requested

C#
>>981

chatbots
>>1430

computer history
requested

CUDA
requested

deep learning
requested

esoteric programming languages
requested

F#
requested

Fortran
>>802

functional programming
>>749

Haskell
>>740

intro to CS
>>20

Java
requested

JavaScript
>>1440

Julia
requested

operating system/kernel development
requested

language design and implementation
requested

Lisp
>>262

machine learning
Post too long. Click here to view the full text.
46 posts and 9 image replies omitted. Click reply to view.

 No.1483

File: 1550689961352.jpg (43.52 KB, 700x393, 1538067260136730579.jpg)

>>1482
Thank.



File: 1566094388900.jpg (51.79 KB, 1200x806, 1490320718879-1.jpg)

 No.1714[Reply]

I have several ideas for some cool browser extensions/addons that could make a radical difference in how people interact on the web, so much so that I'm ready to dedicate the rest of my life to realize this one idea, I think it could create a new Internet golden age.

at this point, I have only knowledge of HTML/CSS and recently started learning python.
Ultimately what I want to make is a fork of Firefox with all the extensions I've imagined built-in. some of which would make some pretty fundamental changes to the basics of the browser itself.

Can I get a road map of what to learn to so that I can make this? like what programming languages? but also anything else that might be useful.

I imagine that if I where to publish my ideas that almost immediacy there'd be people who would develop it. but I want to make sure that it will be open source and also released with all the features fully ready at the same time at launch, otherwise id fear of simply having ideas ripped off and poorly implemented in other browsers, or worse yet in an incomplete form, even tho each idea fairly different, they all come together to create the full experience. if the browser can be released in its full form from the beginning though, I believe it would have the greatest chance of wide adoption.

for the above reasons, I want to start out by making it alone and only after the visions fairly concrete invite others on board to help build it.

so again what should I learn? Thank you Alice.

 No.1715

File: 1566094746649.jpg (26.13 KB, 540x540, 645645646.jpg)

wanna give a rundown on what the extensions would be?

 No.1716

>Ultimately what I want to make is a fork of Firefox with all the extensions I've imagined built-in. some of which would make some pretty fundamental changes to the basics of the browser itself.

It doesn't sound like extensions are what you're looking for. What they're capable of is very limited in scope.

 No.1717

This is the closest thing to what you want. https://breach.github.io/breach_core/
As you can see, it's long dead.

>I imagine that if I where to publish my ideas that almost immediacy there'd be people who would develop it

You lack self-awareness.

 No.1770

>>1714
Check out the Qutebrowser code base. They make use of Python.

>I imagine that if I where to publish my ideas that almost immediacy there'd be people who would develop it

Lol, so full of yourself. Your ideas are soykaf, I guarantee it.



File: 1568353871005.jpg (12.5 KB, 128x156, content.jpg)

 No.1762[Reply]

 No.1763

I can't tell what you are asking. You want this book? Just get any book about Javascript and you will pick it up all the same. They are all approximately the same and a lot are available online.

 No.1764

>>1762
Are you asking someone to buy this for you?

 No.1765

Sorry op, I had a knock at it but wast able to turn it up.
if you want to have a further look yourself try searching through open dir's:
https://www.reddit.com/r/opendirectories/
still a chance its out there, Just couldn't find it on my first few comb overs.



File: 1561302657488-0.jpeg (78.86 KB, 1520x1080, lain-code-1.jpeg)

 No.1605[Reply]

Everything C++: What you like/dislike about it, what you'd like to improve. Of course, also post your C++ projects.

I really like C++ because it is powerful, yet allows very intricate control over what the machine does. I think that efficiency and adaptability are the most important features of code, aside from cleanliness. What I don't like about it is that the syntax is not parsable by push down automata (so it's not context-free).

Presenting:
libcr
, a coroutine library I have written in C++.
https://github.com/sm2coin/libcr
It achieves true M:N threading, and I spent a lot of time on the atomics to try to make the scheduling as efficient as possible.
I benchmarked it, and its context switching and scheduling is faster than Rust's and Golang's coroutines (>1.5x) / goroutines (>20x @ 12 cores), so I am quite proud of it. Because of efficiency reasons, coroutines do not have their own stacks, so scoping variables and native exceptions are not supported. But the syntax ended up being nice enough to not be a nuisance, I think (see the docs/intro.md).

Let's all love Lain!
16 posts and 3 image replies omitted. Click reply to view.

 No.1685

Icelake just came out.
Looks great. Can't wait to play with the new instructions

https://www.anandtech.com/show/14664/testing-intel-ice-lake-10nm

 No.1697

>>1659
This might be a stupid question, but isn't vectorization the same thing as SIMD?

 No.1698

>>1697
Vectorization is the general high level concept of having data-parallelism in some way. Being able to process large chunks of data in a parallel way.
SIMD is an implementation of vectorization

 No.1760

I want to learn C++ with all the shiny additions from the recent standards, what would you recommend to study? I knew some basic C++ years ago, know C fairly well and used other OOP languages.

 No.1761

>>1760
Why do you want to know it?

If you want to know it to use for something, then
practice using it for that thing,
follow best practices, and
you will learn everything you need to know.



File: 1511649036195.png (32.46 KB, 600x600, C.sh-600x600.png)

 No.882[Reply]

Reasons to learn C

C has a significant amount of software written in it, including the Linux kernel. Learn C if you ever want to hack on the kernel, any UNIX-based operating system, device drivers, or other embedded / firmware / device-level software.

It has two major compilers (gcc and clang), with gcc being the oldest and most popular and clang being younger but built on a better technical foundation. This is in addition to a high volume of static and dynamic analysis tools. Learn C if you like languages with lots of tool support available.

C is very good for writing simple single-threaded programs that go fast with low memory overhead. Learn and use C when you want more explicit control over your program's memory usage and the operations it performs, e.g., for implementing searching and sorting algorithms.

Learn C if you ever want to do any kind of reverse engineering or executable binary analysis. It's likely the thing you'll be analyzing will have been written in C or something similar.

Learn C if you want to get a good software engineering job. There are lots of opportunities for both maintaining old C code and writing new C code.

Things that aren't reasons to learn C

Plenty of people might disagree with me on these, but I feel like there's a lot of misconceptions about what C is good for and what it isn't good for. Here's some things that it's not so great for.

Don't learn C for writing performant programs. Earlier I mentioned that C is good for writing simple programs with low memory overhead and great single-threaded performance. Anything more complex than this starts to get nontrivial very fast. This is because C has generally poor and difficult to use concurrency tools (complicated multithreading, synchronization, and atomic primitives that take a lot of effort to use correctly).

Don't learn C for writing anything complex that also needs to be correct. Proving the correctness of a C program is more or less impossible without first writing it in a second, more formal language. C is also full of undefined behavior, which is pretty easy to avoid, but you have to know what to look out for.

Don't learn C if your real goal is to learn C++. Just learn C++ in that case. C and C++ are different languages with very different best practices.

Don't learn C to make it easier to learn other languages later. IMOPost too long. Click here to view the full text.
38 posts and 5 image replies omitted. Click reply to view.

 No.1755


 No.1756

>>1752
I think you meant:

        rnd_chr = 33 + (unsigned int)(next/65536) % (127-33);


Can't see much optimisation further beyond buffering rnd_chr and using puts.

 No.1757

#include <time.h>
#include <stdio.h>

int main() {
    int next = time(NULL);
    char buffer[11];
    for(char c = 0; c < 5; c++) {
        next = next * 1103515245 + 12345;
        buffer[c*2] = (unsigned char)33 + (unsigned int)(next/65536) % (127-33);
        buffer[c*2+1] = '\t';
    }
    buffer[10] = 0;
    puts(buffer);
    return 0;
}

 No.1758

Benchmarked 3 runs each.

Original code executed in 13892.115234 milliseconds.
Optimised code executed in 0.017000 milliseconds.

Thats a pretty good speed up. ;-P

 No.1759


>>1756
>>1757

It's probably faster to reduc
>>1757



File: 1504272543539.jpg (37.62 KB, 306x306, artificial-intelligence.jpg)

 No.582[Reply]

8 posts and 1 image reply omitted. Click reply to view.

 No.1397

Guys i want to start machine learning but what should one learn before starting it? I think it might be exhausting to directly start to learn ML.

 No.1399

http://libgen.io/book/index.php?md5=C37CE53726FB431E5815F9B1E573BFD6

I do not know what I am talking about.
Figured I'd say that before I go recommending things.
I'm taking an intro to AI course right now and this is the book we're using. I love it. I think you should read through most of this and try to implement some of the algorithms. The pseudocode is in there and it's pretty clear. I'm taking a ML course next semester but at the end of this intro to AI course my prof said he would get into ML for about a week at the end. The fact that he said that we'd get to it at the end probably means that I should know the intro stuff before I learn the ML. Hope this helps.

 No.1410

>>1397
I'm planning on starting ML too
I would think some linear algebra, data science, statistics, and Python( or R i guess) would be prerequisites?
But I haven't actually learnt anything yet so I dunno

 No.1581


>>1410
Actually i suppose that python is best choise for machine learning, as making code in it is really fast, what is more, you shouldn't spend much time on linear algebra because its like a black box, what will be more better for you is focusing on some basic things and understanding statistic and plot of machine learning. After that you can take some advance steps to learning neural networks and choosing a kind of speciality (like computer vision engineer)

 No.1749

>>1581
>you shouldn't spend much time on linear algebra because its like a black box
depends on what your learning objectives are.

If you want to really deeply understand what is going on from a theoretical perspective, linear algebra is a must because it is so crucial.

If you want to get started actually making AI's right away, you can skip it I guess but you'll just be gluing together other peoples' work.



File: 1567363704250.png (9.15 KB, 417x73, SS.png)

 No.1731[Reply]

Hey Alice, please help me with a little something.
how can i permanently hide the title/name of all tabs in Firefox?
I'd like for all tabs to look like a pinned tab (pic related, right click tab for the pin option)
3 posts omitted. Click reply to view.

 No.1737

File: 1567474620653.jpg (108.61 KB, 372x540, 755648d9969ec2c9ad43f903f8….jpg)

>>1733
𝘈𝘭𝘳𝘪𝘨𝘩𝘵, 𝘵𝘩𝘢𝘵 𝘳𝘦𝘮𝘰𝘷𝘦𝘥 𝘵𝘩𝘦 𝘵𝘪𝘵𝘭𝘦, 𝘵𝘩𝘢𝘵'𝘴 𝘢𝘯 𝘪𝘯𝘷𝘪𝘴𝘪𝘣𝘭𝘦 𝘜𝘯𝘪𝘤𝘰𝘥𝘦 𝘴𝘺𝘮𝘣𝘰𝘭 𝘳𝘪𝘨𝘩𝘵,? 𝘤𝘰𝘰𝘭. 𝘵𝘩𝘢𝘯𝘬 𝘺𝘰𝘶 𝘈𝘭𝘪𝘤𝘦. 𝘕𝘰𝘸 𝘪 𝘯𝘦𝘦𝘥 𝘢𝘥𝘷𝘪𝘤𝘦 𝘰𝘯 𝘩𝘰𝘸 𝘵𝘰 𝘢𝘶𝘵𝘰𝘮𝘢𝘵𝘪𝘤𝘢𝘭𝘭𝘺 𝘢𝘱𝘱𝘭𝘺 𝘵𝘩𝘢𝘵 𝘢𝘭𝘭 𝘵𝘢𝘣𝘴 𝘢𝘴 𝘸𝘦𝘭𝘭 𝘢𝘴 𝘴𝘩𝘳𝘪𝘯𝘬 𝘵𝘩𝘦 𝘵𝘢𝘣 𝘴𝘪𝘻𝘦 𝘥𝘰𝘸𝘯 𝘵𝘰 𝘫𝘶𝘴𝘵 𝘵𝘩𝘦 𝘧𝘢𝘷𝘪𝘤𝘰𝘯.

>>1734 𝘺𝘦𝘢𝘩 𝘣𝘳𝘰𝘸𝘴𝘦𝘳.𝘵𝘢𝘣𝘴.𝘵𝘢𝘣𝘔𝘢𝘹𝘞𝘪𝘥𝘵𝘩 𝘪𝘴 𝘦𝘹𝘢𝘤𝘵𝘭𝘺 𝘸𝘩𝘢𝘵 𝘪 𝘯𝘦𝘦𝘥. 𝘢𝘭𝘴𝘰 𝘐 𝘸𝘢𝘯𝘵 𝘢 𝘤𝘰𝘮𝘱𝘭𝘦𝘵𝘦 𝘴𝘰𝘭𝘶𝘵𝘪𝘰𝘯, 𝘴𝘰 𝘶𝘯𝘧𝘰𝘳Post too long. Click here to view the full text.

 No.1738

File: 1567491298408.png (10.01 KB, 168x109, Screenshot_2019-09-03_08-1….png)

Actually, it looks like you can set the max width in userChrome.css:
.tabbrowser-tab:not([pinned]) {
max-width: 40px !important;
min-width: 40px !important;
}

It kind of works but I wonder if you could just hide the title.

 No.1740

I found this OP, it seems to do what you want: https://github.com/yjp20/ultracompact-firefox

 No.1743

>>1740
WHOOOO HOOOO!!!! that's exactly what i wanted, thanks a billion, if there's anything I can do in return that's within my abilities just ask.

here is something a photoshooped so if you want something shooped maybe i could do that (:

 No.1744

>>1743
image wont post for some reason, here is a link: https://imgur.com/a/CvyrrKE



File: 1497896413935.png (47.47 KB, 1200x800, rust.png)

 No.266[Reply]

Why are you not using language with the best mascot?

If you are, share your experiences and projects.

Want to learn?
Read the book https://doc.rust-lang.org/book/second-edition/

Questions are welcome
35 posts and 5 image replies omitted. Click reply to view.

 No.1722

>>1601
>I think this has now been largely accepted as a mistake by the people involved.
What makes you say that? The talk you posted seems fairly positive.

>The main thing I have against Rust is how Cargo and the Crate ecosystem operates.

I don't really understand this complaint, because as far as I can tell having tools like Cargo just give you more options. You don't need to use Cargo to use Rust, (a Makefile which runs rustc would work fine), but it's popular because automatic dependency resolution is more convenient for most programmers.

>When you create a new Rust project the first thing Cargo does is phone home

That's simply not true. Try it.

>It feels like you have no control over your own project, everything has to be tightly integrated with the Cloud Overlords. I hate that soykaf. Its the exact opposite of what freedom and open source should be about.

I feel like you're misunderstanding what Cargo does. "Cloud Overloads" implies that Cargo's behavior is somehow dictated by someone else, and that it's outside of your control. Cargo's documentation not as clear as it should be, but it is ultimately still just a tool under your control. If you ask it to use a remote resource, then it will go and fetch that resource. If it's hitting crates.io then that's because you've asked it to and didn't tell it not to.

>the language doesn't actually offer very much over plain C when half your genuine low level code winds up being a giant `unsafe` block anyway.

That's not how "unsafe" works. The whole point of unsafe is to build a safe interface over otherwise-unsafe operations, so if your application logic ends up in a giant unsafe block you're using unsafe wrong.

>not some trendy unstable meme-language from web weenies LARPing as "low level coders".

Now you're just being rude.

 No.1724

File: 1567186662471.png (8.43 KB, 242x220, lisp-mascot.png)

ahem

 No.1730

>>1613
Go's concurrency is quite useful for more mundane tasks as well. I've been replacing a lot of Excel/Access stuff for my small-business employer with Go-backend web apps. It's stuff like scheduling shop workers, time/material sheet data-entry, tracking cost statistics over time, etc. I love Go's excellent concurrency handling for stopping data races before they happen. Plus, it was fun to show the boss how fast it all is. Our pretty-damn-fast CAD workstations just chugged on some of the old crusty Excel/Access VBA crap we had. The Go stuff I've built screams on a cheap little Intel NUC.

I never understood some of the hate that Go gets. Sure, it's not a one-size-fits-all language - someone would have to be mental to write a kernel in it. But it's a fantastic web app language. I love being able to jettison both PHP and nginx from my life entirely, and dramatically lessen how much I need to do in javascript.

 No.1741

>>1730
>The Go stuff I've built screams on a cheap little Intel NUC.
What did you mean with "scream"?

 No.1742

>>1741
I mean that it runs fast.



File: 1492464152227.png (90.3 KB, 512x512, 1492029822151.png)

 No.8[Reply]

Share resources, PDFs and books. Also discuss and share projects you have been working on.

Beginner Questions are also welcome.
36 posts and 5 image replies omitted. Click reply to view.

 No.1703

Currently learning Python (first programming language) and having a really good time. Right now I'm learning about for loops and ranges. I was hoping someone could explain this phenomena to me.

Input:
for number in range(5):
    print (range(number))


Output:
[]
[0]
[0, 1]
[0, 1, 2]
[0, 1, 2, 3]


My question is why is the first slot blank? Why is it not [0] on the first one, and the last one [0, 1, 2, 3, 4]?

 No.1704

>>1703
With
range(n)
you get the positive integers that are smaller than
n
. The first is empty since there's no such number (0 is not smaller than 0), and
[0, 1, 2, 3, 4]
is not included as
number
will never be 5 (as it is not smaller than 5).

 No.1705

>>1703
The upper limit of 'range' is exclusive. The first 'number' is 0, and a range with an exclusive upper limit of 0 is empty. The last 'number' is 4, and you get the range with an exclusive upper limit of 4.

More importantly, drop whatever it is you're following and learn Python 3 instead.

 No.1706

>>1705
Yes, I realize I've been running them under python2 instead of 3.
(ie,
python xxx.py
instead of
python3 xxx.py

Luckily I believe what I've learned has been python3, so my learning is more or less up to date. I appreciate the concern.

 No.1739

test



File: 1495202459771.jpg (154.58 KB, 1280x720, mpv-shot0055.jpg)

 No.129[Reply]

Let's discuss ways to get better at programming. How do you practice?
10 posts and 1 image reply omitted. Click reply to view.

 No.1689

>>1687
I do that sort of thing a lot. Not really from books, but I guess an example is I've been doing Python3 exercises (www.practicepython.org) and sometimes I'll look at the solutions that other people post when I get stuck. It's helpful simply seeing the solution, especially since I'm a beginner and don't really know how to look stuff up myself yet. Then I can put the pieces together myself and come to my own understanding.

 No.1690

>>1687

I did once, I found that a lot of the examples had errors that I had to correct. I guess I learned what I was supposed to, really really well, but I don't bother typing in examples anymore.

 No.1691

>>1690
Why not? Would you rather learn erroneously? If nothing else, it is a good indicator that you are studying with diligence (or that you need to look for a better book).

 No.1709

>>1653
There are so many sites like this where you are given some tests and have to write code to pass them. Does the opposite also exist, an exercise site where you have to write tests that catches errors?

 No.1729

There are a lot of practice in competitive programming. Try: codeforces, acm.timus.



Delete Post [ ]
Previous [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
[ Catalog ]