[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]

λ - programming

/lam/bda /lam/bda duck
Name
Email
Subject
Comment
File
Password (For file deletion.)

BUY LAINCHAN STICKERS HERE

STREAM » LainTV « STREAM

File: 1446921776617.png (368.05 KB, 1899x1593, intent.png) ImgOps iqdb

 No.11658[Reply]

This is the Beginner's General for beginner's questions.

If you have a simple question and a suitable thread doesn't already exist, just post it here and someone will probably try to answer it for you.

Remember to do some research before asking your question. No one wants to answer a question that a simple search can already resolve.
61 posts and 6 image replies omitted. Click reply to view.
>>

 No.12457

I've started learning haskell and would like to learn with someone else. If anyone here would like to learn haskell together and work on small pet projects to become better then it would be great.

I'm working on unix if that helps

Currently I'm the only one learning haskell at uni while the others learn python so I've not been able to compare code or discuss how to approach different problems with anyone on my course. Would have tried the computing society if they were still going but that seems to have disolved last year. Also there isn't any lacturers who know it well enough to teach it here (they mostly do C++, Java, ASM and one does Lisp).



File: 1404500492838.png (152.19 KB, 311x311, 1364376437927.png) ImgOps iqdb

 No.1498[Reply]

Always check the catalog before creating a thread: >>>/λ/catalog

Please check the rules before you post: https://lainchan.org/rules

To properly display code, surround your block of code with [code] and [/code].
main :: IO ()
main = putStrLn "Hello, world."

If you want to learn programming, use Python or something. That topic has been discussed to death, and there is no definitive answer.

https://www.coursera.org/ · http://learncodethehardway.org/ · http://www.codecademy.com/ ·http://programming-motherfucker.com/

Please no religious wars.


File: 1449243414866.png (23.21 KB, 1000x1000, fstar-new.png) ImgOps iqdb

 No.12485[Reply]

https://www.youtube.com/watch?v=em_tDc1Gc40

https://www.fstar-lang.org/#introduction

This looks extremely cool. It has dependent types and SMT solver to prove code correct, uses monads for effects.


File: 1449238783144.jpg (973.79 KB, 1629x1113, Girl-in-her-sandbox.jpg) ImgOps Exif iqdb

 No.12482[Reply]

Let's have a thread about containerization and sandboxing.

I love the idea of compartmentalizing things to increase security. A program that runs in a chroot generally wouldn't be able to see anything outside of its designated area - it's exactly like the matrix.

I'd been using a chroot to run my a web browser with flash player inside for a long time. Recently I've set up an LXC system (linux container) which is supposed to give stronger seperation than a chroot (it isolates more than just the filesystem).

I also use virtualbox for Windows XP (and Dosbox for DOS) - you can do all kinds of things like carefully select which USB devices get through to it, what internet it has. Unlinke a chroot or LXC, you are really running a sepearate OS kernel.

As with anything in security it has two sides: Feel free to discuss chroot breakout attacks, how a lxc container that has X forwarder could key log the host system and so on.
>>

 No.12484

I just read this in a 8/tech/ DNS thread:

>Also, if you're concerned about this, you should be aware that certain programs (like Steam, infamously) will monitor your DNS lookups and send those IP and hostname records to Steam HQ. They issue VAC bans based on IP lookups, if they think you're talking to a hack's DRM server.


I wonder if the bridge networking device that is set up for lxc would block stream from being able to snoop on your DNS requests (the ones happening outside the container)?



File: 1448479515017.png (34.79 KB, 563x440, semantic_highlighting.png) ImgOps iqdb

 No.12365[Reply]

https://medium.com/@evnbr/coding-in-color-3a6db2743a1e#.56zigp1qh

I just read this article and wondered what lainchan thought of semmantic highlighting vs syntaxic highlighting ?

I think ssemantic highlighting could be a great help to avoid hours of debugging because of a typo in javascript, but I feel like it wouldn't matter that much in other languages. What do you think, lainons ?
6 posts omitted. Click reply to view.
>>

 No.12451

>>12433
I used that when a sadistic uni professor made us write long ass predicates and lambda calculus on paper. Pretty neat.

>>

 No.12463

>>12433
Why not have quasiquote highlighting?

>>

 No.12464

Kdevelop has had that feature forever. Because it hasn't become staple feature of other ides and editors I assume it's not so good. Typically good ideas get copied immediately by everyone in tech.

>>

 No.12472

File: 1449198402660.jpg (55.46 KB, 600x900, 1417791130700.jpg) ImgOps Exif iqdb

>>12464
>Typically good ideas get copied immediately by everyone in

>>

 No.12483

my gut reaction to this is: Bad idea

syntax hilighting is usually computed using regular expressions - that's a very quick and limited language (sub-turing).

If you want semantic higlighting you would have to pull in a more complex language to figure things out and I imagine it being slow and not responsive as well as having added complexity which means more things could go wrong.



File: 1449188479455-0.jpg (251.53 KB, 1250x819, underwater_room.jpg) ImgOps Exif iqdb

File: 1449188479456-1.jpg (415.31 KB, 1920x1080, technoshaman.jpg) ImgOps Exif iqdb

 No.12467[Reply]

Most of us have heard how amazing the Lisp machines of the 80s were, an operating system dedicated entirely to human-computer interaction and abstraction.

What I've noticed that myself and other lisp hackers end up doing is living out of an CL+Emacs ecosystem, bringing environment variables into the runtime from async shell calls, SBCL native handles etc, into S-expressions or M-x commands which turns these hooks and system objects into objects in our lisp environments.

I do this with my browsers as well, bringing DOM objects in from javascript compiled to from ParenScript Lisp (Common Lisp -> Javascript)
https://github.com/olewhalehunter/kommissar

This is all fine and well until you want to run your system on another machine or your computer crashes and you find yourself setting up your desktop from scratch.

I propose we collaborate on abstracting Linux system hooks, various windowing environment utilities, and any command line programs we use into the SBCL runtime, creating a portable Lisp virtual machine with the possibility of bootstrapping an even more powerful version of Emacs from the result.

Macros can then be created at a system level, we can even bind statistical data on command usage and create command topologies to speed up personal automation or even collaborate on distributed machine learning/AI systems.
7 posts and 1 image reply omitted. Click reply to view.
>>

 No.12477

File: 1449204902640.gif (4.86 MB, 750x500, mycelium.gif) ImgOps iqdb

I tried this before with much less forethought and ended up with a hunk of lisp spaghetti laying around, however I think this can really go far if we focus on providing a singular interface and robust installation procedures


so the logical first step for runtime functionality is hooking X keyboard input: at any point while mycelium is running you should be able to run commands (M-x lookups, emacs keybinds) without having to be focused on emacs

I'll start by hooking CLX to emacs, however I think people who are interested in contributing for now can just submit command line functions they like to hook in lists that we can compile and analyze to categorize

>>

 No.12478

>>12467
Here's the issue with all systems like this: UNIX is so poorly designed that you can't abstract over it like this.

Anyways, there's already a way to just use Emacs as the init and only user interface:
http://www.informatimago.com/linux/emacs-on-user-mode-linux.html

Of course, Emacs Lisp is actually pretty gross compared to Common Lisp, but you have to understand that is entirely because Emacs is nice to use on UNIX, because Emacs has had to adapt to UNIX.

All of those niceties that make Emacs nice to use are what you get when you take a Lisp and specially craft it for a UNIX, because UNIX is broken beyond any hope for repair.

>>

 No.12479

So you want dmd, guix, scsh and emacs-guile but rewritten in Common Lisp?

>>

 No.12480

The more I think about this, the more it seems to me we're trying to make a lisp-systemd. No, I'm not trying to insult anyone. I think that's the closest to a full lisp machine we can emulate on a linux kernel. A daemon which runs as PID 1 as root and sts up services, and spawns a client which is essentially a lispy shell.Now the clients are full lisp runtimes and the server manages users and resource distribution on userspace acting as a middleman between kernel and user

>>

 No.12481

>>12480
This is actually sounds like a pretty good system design, especially when implementation matures.



File: 1448169759527.jpg (1.34 MB, 2001x773, Space-cadet.jpg) ImgOps Exif iqdb

 No.12245[Reply]

This is the Lisp General, ask any and all Lisp questions here. Below is a link to the general's pastebin which contains many links to various books, documentation, websites, and other interesting information.


>Check the pastebin first:

http://pastebin.com/u/g-lisp-general


>Read the FAQ:

http://pastebin.com/aDfDm5sZ

>To foster discussion:

Which dialect do you prefer?
Do you use Emacs or a different lisp-based editor?
What was your first experience with lisp?
What have you made in lisp?
Post too long. Click here to view the full text.
33 posts and 4 image replies omitted. Click reply to view.
>>

 No.12431

>>12430
>What does "with X11" even mean? Just a graphical program?
Basically, unless you're on Windows, although you could get creative and do something not graphical that still uses a facility of X11, like reading mouse movements.

>>

 No.12440

>>12383
Yeah that's a clumsy workaround, as is this line in .emacs I found from archwiki:
(require 'iso-transl)

It still doesn't work normally with that. Normally in any other application when pressing any dead key twice it would produce that accent character on its own. With that line it "works" but requires some other character to be pressed after that. I even have custom keybind to remap doubletap of one dead key to tilde like
(local-set-key (kbd "¨") (kbd "~"))
...and no, my .emacs is not at fault here, tested with emacs -Q

Emacs has worked before, meaning that it behaved like any other application! I've been using this for about two years now as main editor, on same distro and it has always worked. Something weird has happened. I even compiled fresh Emacs 24.5 off the sources and it has the same problem, so it's not some distro packaging fukup.

I also tried asking around in #emacs@freenode but they weren't very helpful to put it lightly.

*sigh* I'm on verge of giving up on Emacs and lisping with it for lack of tools. I simply don't have time or interest to spend my days troubleshooting some weird problem when I have n+2 other things to do.

>>

 No.12443

>>12440
I'm only vaguely aware of what's happening, but perhaps you should look into binding xdotool to these "dead keys".

>>

 No.12466

>>12443
I zeroed the problem into something that Emacs fails when it receives keystrokes from X11 or whatever. Because Emacs works as excepted in Windows 10. That is, doubletapping dead keys works the same in all Windows applications, including Emacs. Well, it's been a while since I last used Windows, might as well stay here indefinitely.

>>

 No.12468

File: 1449188837538.gif (2.69 MB, 309x301, jelly.gif) ImgOps iqdb


Who's tired of forgetting command line parameters for badly named system utilities? Lets make a modern lisp machine:


>>12467



File: 1445041507227.gif (473.46 KB, 500x355, tumblr_n594zqluJ31rpfk7eo1….gif) ImgOps iqdb

 No.10590[Reply]

Why do you like CS/CE, Lainons?
55 posts and 3 image replies omitted. Click reply to view.
>>

 No.12327

>>10781
>Learning Haskell in the first semester

How was hell for you mate?

I couldn't even implement a Lisp Parser in it

>>

 No.12331

>>12312
that's not even CS/CE

>>

 No.12332

I'm really clumsy and it can be practical without having to do physical work with my hands. And I seem to be more naturally good at it than physics and maths which I already have a degree in, yet those things can relate to it

>>

 No.12334

>>12327
>How was hell for you mate?
Nice and warm actually. Although seeing others being burned to death wasn't a very pleasant experience (In most cases).
We practically did a little less than lyah covers (a bit more theoretic stuff though), so it was alright for the first semester.

>>

 No.12465

I frankly study CS for the money and because I realized at one point that everything is computerized and thus there is still truckloads of money to be made. AI winter and dotcom crash kinda never happened if you look closely. I'm especially enamoured with that minimum required starting investment for software business is arguably zero in case one happens to own computer, which is likely. It's also terrific business because it's endlessly self-expanding. Invest in some software solution, then get ready to keep on investing to it for years because it's likely buggy as hell, which in turn spawns few consults and others just to help the poor business which thought they bought good stuff. I'm almost positively confident that productivity of humanity would increase instantly 17% if everyone smashed their computers and smartphones right now. So everyone is seeking this miraculous productivity leap which 80% of the time doesn't happen, annoys everyone in company because they have to learn new habits and forces to pay to some experts to keep it running. IT industry is kinda like bunch of cunning robbers: first one sells cake that is accidentally dynamite, client kitchen blows up so second one gets paid to investigate what happened, third one gets paid to remodel entire kitchen now that client blew it and firts one is coming back because he is the only one who can deduce from dynamite remnants what he gave his precious client in order to make things right.

tldr money



File: 1444439744019.png (173.04 KB, 2000x2000, Python-logo-notext.svg.png) ImgOps iqdb

 No.10376[Reply]

A lot of the online resources for learning Python are aimed at total beginners.

I've comfy with programming in a variety of languages. What's the best source to learn Python?

Of course, the best place is the official guide, but I am also looking for other resources.

Thanks!
51 posts and 16 image replies omitted. Click reply to view.
>>

 No.12425

>>12417
>zed shaw is a dick and it's really boring
explain

>>

 No.12426

>>12425
>zed shaw is a dick
I'm pretty sure this is something he's proud of
>it's really boring
try it and see what I mean
oh also LPTHW is out of date, it's only for python 2.7 and you should learn python 3

>>

 No.12427

http://pythontutor.com/

This has helped me a lot with visualizing recursion traces.

>>

 No.12461

>>12460
It's basically repetition to drill soykaf into your head. It's basically a less fun version of one of the *Koans

>>

 No.12462

>>10386
>>10392

Relax guys you're in the deep web :). Just check out the robots.txt. Just don't get take notice if they can't find you on google.



File: 1441525631604.png (525.62 KB, 600x600, a0b88990fb642934d816520503….png) ImgOps iqdb

 No.9154[Reply][Last 50 Posts]

The Programming Challenges thread is a thread where we'll try to post regular, simple challenges for everyone to give it a try and post their solutions.

>Which languages should I use?

Use whatever you want or feel the most comfortable with.

>For what purpose?

This thread is supposed to provide us the oppurtunity to improve our skills by both practicing and reading other peoples code.
In the spirit of everyone learning collectively, feel free to ask questions about anything in other peoples code you can't figure out yourself.

>But I don't know how to program.

No problem, get started with one of these excellent books:
Learn Python the hard Way: http://learnpythonthehardway.org/
Learn You a Haskell for Great Good: http://learnyouahaskell.com/
Structure and Interpretation of Computer Programs: https://github.com/sarabander/sicp-pdf

Post too long. Click here to view the full text.
235 posts and 23 image replies omitted. Click reply to view.
>>

 No.12434

>>9157
rolling

>>

 No.12452

>>9157
rollan

>>

 No.12453

File: 1449004051770.gif (1022.27 KB, 500x271, 1439409781080-0.gif) ImgOps iqdb

>>9157
I'm not gonna get something easy, am I?

>>

 No.12458

Dice rollRolled 5689 - 201

all of the newfriends ITT should see >>9776 for dice rolling help on this very slow board.

>>

 No.12459

>>12458
as should I it seems.



Delete Post [ ]
Previous [ 1 / 2 / 3 / 4 / 5 / 6 / 7 ]
| Catalog