[ 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
Ok, who did it?

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.
72 posts and 7 image replies omitted. Click reply to view.
>>

 No.12506

>>12499
>All I'm doing is changing the "3"'s next to point to "5". So there's nothing pointing to "4" anymore. Since C doesn't have a garbage collector, does it mean that the memory space occupied by "4" will exist as long as the program is running (using the modified function above)?
yes, that's how it works. it doesn't mean the program will stop working, at least not until the machine runs out of memory. that's why memory management is hard, because it's not obvious when you do it wrong. try using valgrind.



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: 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.
12 posts and 2 image replies omitted. Click reply to view.
>>

 No.12486

File: 1449251635447.png (468.83 KB, 492x611, 1447001894806.png) ImgOps iqdb

>>12477
I want my BASH to look like this
how do i aquarium?

>>

 No.12489

>>12478

>lisp-systemd


that's not what this is trying to accomplish

nothing has to be pulled out into userspace until the user wants so; most every lisp hacker that stays in linux land does this but without collaboration with others to tame improper code abstraction; anyone wishing to build a robust cross-platform networked virtual machine in linux using lisp would have to do this anyway

this is entirely about providing base emacs macro-ability to whatever you want to pull from userspace into lisp-land


>>12486

I set my emacs background alpha to a lower value and throw up a video/WebGL instance from a browser tab which I can manipulate from kommissar

>>

 No.12492

>>12480

that isn't what this is trying to accomplish; this idea here is an emacs+SBCL runtime with facilities to virtualize what most people like to manipulate or configure over the command line on whatever operating system stack they use

>>

 No.12510

Why SBCL instead of ECL? Mashing together C and Common Lisp is trivial in ECL and I gather that's what you want to do ITT.
https://common-lisp.net/project/ecl/quarterly/volume2.html#orgheadline11

>>

 No.12511

For manipulating X windows I know of wmutils, but I never used it myself.
https://github.com/wmutils/core



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)?

>>

 No.12491

>>12482
Containers are not the answer to security.
Chroots are fine, security mitigations are the way to make sure applications don't break out of chroots.

Look at the OpenBSD project.

>>

 No.12508

why aren't they security?



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 ?
9 posts omitted. Click reply to view.
>>

 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.

>>

 No.12495

>>12483
It's just two regexes instead of one, use the one that would highlight the variables names in order to extract said names, and build other regexes that match strictly the names.

>>

 No.12507

>>12464
It seems more likely to me that text coloring in general isn't really that useful, but only seems to improve readability; i.e. it's comfy. Semantic coloring isn't familiar, and thus is less comfy.

>>12472
A great deal of Lisp's historical innovations have been copied so extensively that they aren't even considered Lisp's anymore.

>>

 No.12509

>>12507
>A great deal of Lisp's historical innovations have been copied so extensively that they aren't even considered Lisp's anymore.
And how long did that take?



File: 1443986121456.jpg (224.75 KB, 800x600, 1431324690384.jpg) ImgOps Exif iqdb

 No.10143[Reply]

So, I find that I suck quite badly at math, especially when it comes to computing and things like combinatorics and set theory (in general any math). other than Khan Academy, anyone have a good way to beef up these skills? I was thinking project euler, but even challenge one kinda gave me an anxiety attack. Thanks in advance.
20 posts and 2 image replies omitted. Click reply to view.
>>

 No.11020

>>11016
>>11017
sure I understand all that but it's still a LOT of book to get through.

that 8chan list looks a little shaky at the entry levels but CLRS and Concrete Mathematics are no-brainers.

>>

 No.11023

>>10143
Combinatorics and Set theory can be really fuarrrkin' hard.
Especially if youre not attending classes or youre learning its very structured.
D/w man, you have motivation, all you need is discipline, and you will be good!

>>

 No.11184

Do you need multivariable calculus before linear algebra?

>>

 No.11200

>>11184
you should be learning linear algebra before multivariable calc.

>>

 No.12505

>>11184
>>11200

In my experience, it doesn't really matter too much, since the majority of the topics covered are different other than stuff like dot product, and the idea of vectors. I learned multivariable before linear algebra, and I was fine.



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

 No.12490

>>12485
It's still not a pure language.

>>

 No.12493

It's pretty cool.

>>

 No.12500

>>12490
I don't think you understand what you're talking about



File: 1445289044946.png (75.79 KB, 800x600, elixir-vertical.png) ImgOps iqdb

 No.10736[Reply]

who /elixir/ here?
13 posts omitted. Click reply to view.
>>

 No.10891

>>10888
I haven't yet, but if I really like Elixir I'll give it a shot.

IMO it is more important to understand the Erlang architecture, OTP, and its concurrency model than the language syntax itself.

A good book like Elixir in Action, which I posted earlier in this thread, does that.

That said, I've heard good things about "Learn You an Erlang".

>>

 No.10892

File: 1445612409742.pdf (5.07 MB, Elixir.pdf)

>>10891
Correction, I did not post it earlier. Here it is.

>>

 No.10894

>>10889
>Reusing a variable name doesn't change the value of the old one. If you passed the original variable to a function the value will always be the same. It's more like redeclaring than overwriting.

Yeah, that makes quite a bit more sense.

>>

 No.10895

>>10892
Thanks, lainon!

>>

 No.12496

I'm a Common Lisper who's been considering learning Erlang.

Why should I go with Elixir over LFE?



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



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