ELLIOTTCABLE changed the topic of #elliottcable to: a _better_ cult
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
alexgordon has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Determinist has joined #elliottcable
jesusabdullah is now known as NarutoBlaze69
NarutoBlaze69 is now known as jhizzle
jhizzle has left #elliottcable [#elliottcable]
fwg has quit [Ping timeout: 245 seconds]
<devyn> ELLIOTTCABLE: wait so, did you make it here or?
<devyn> :(
<joelteon> i don't know what it is about haskell, but it's such a beautiful language
nuck has quit [Excess Flood]
nuck has joined #elliottcable
eligrey has quit [Quit: Leaving]
fwg has joined #elliottcable
<katlogic> jeannicolas: You mean it's a beatiful religious cult.
<katlogic> damn, too -ECOMMONPREFIX
alexgordon has joined #elliottcable
alexgordon has quit [Read error: Connection reset by peer]
alexgordon has joined #elliottcable
yorick has joined #elliottcable
<alexgordon> so from what I can tell there's 6 types of arrays
<alexgordon> statically allocated, stack allocated constant size, VLAs, combination VLA/heap arrays, constant size heap arrays, resizable heap arrays
<alexgordon> although a constant size heap array is basically a combination VLA/heap array with a stack buffer of 0
<katlogic> what is combination VLA/heap array?
<katlogic> you mean VLS (structure ending in array, as in struct dentry in C?)
<katlogic> yes, those are stack and heap VLAs
<alexgordon> right
<alexgordon> combination
<katlogic> combination?
<katlogic> oh you mean it allocates depending on argument um ... thats not exactly part of type
<alexgordon> katlogic: it allocates depending on the argument
<alexgordon> at runtime
<katlogic> yes, thus no part of type :)
<alexgordon> yeah
<katlogic> alas, you're better off to keeping the stack case to static length
<katlogic> VLAs on stack are really bad idea
<katlogic> as it ruins register renaming on modern CPUs
<alexgordon> pfft petty performance concerns :P
<katlogic> :)
<katlogic> In C++? Always!
<katlogic> also -fno-rtti -fno-exceptions :)
<alexgordon> doesn't ...calling a function ruin register renaming?
<katlogic> usually not, this kind of template would be inline
<alexgordon> well I can't speak for the inliner but it seems pretty heavyweight to me
<katlogic> the idea is if (n <= STATIC_LEN) { T arr[STATIC_LEN] } else { new ...
<katlogic> (you can list the generated code and see why it is actually good idea)
<alexgordon> thing is, then you're allocating a lot more memory on the stack
<katlogic> And nobody cares.
<alexgordon> which means you'd probably have to make STATIC_LEN smaller
<katlogic> Indeed, nobody cares unless you do recursive calls :)
<alexgordon> which means more mallocing, which means slower
<katlogic> Ah, nevermind I said anything.
* katlogic does not want to live in a world where stack is malloc()
<alexgordon> LOL
<purr> LOL
<alexgordon> anyway the point of this was to list all the different array types for my compiler
<alexgordon> since I realize yesterday that using std::vector-like resizable heap arrays for ALL THE THINGS is probably not a good idea
<katlogic> Indeed that is the epitome of what is all wrong with C++.
<katlogic> People who dont look underneath should just sticky with Java.
<alexgordon> wellll C++ has std::array now so at least it's not so horrible
* katlogic refuses to acknowledge std:: exists
<katlogic> or Boost:: for that matter
<alexgordon> oh boost is a clusterfuck
<alexgordon> I included one boost header once and it added over a minute to my compile time
<alexgordon> ha I'm reading stalin's source, it has comments like "begin delete for Trotsky'
<alexgordon> sounds ominous
<alexgordon> mmmm what you really need are mini areans for local memory allocation
prophile has joined #elliottcable
<alexgordon> hi prophile
eligrey has joined #elliottcable
<prophile> hi alexgordon
prophile has quit [Ping timeout: 276 seconds]
prophile has joined #elliottcable
<ELLIOTTCABLE> devyn: no. >:
<ELLIOTTCABLE> vigs: “jsdb?” I only found http://www.jsdb.io
<ELLIOTTCABLE> katlogic: “Indeed that is the epitome of what is all wrong with C++.”
<ELLIOTTCABLE> katlogic: how wso?
<ELLIOTTCABLE> 9:19 AM <+alexgordon> I included one boost header once and it added over a minute to my compile time
<ELLIOTTCABLE> prophile, alexgordon. morning.
<prophile> hey elliott
vil has quit [Ping timeout: 264 seconds]
<alexgordon> hi ELLIOTTCABLE
<katlogic> ELLIOTTCABLE: Using overly general primitives in systems language.
<katlogic> I mean, thats cool in Java, JS or Ruby, but C++? Naaa.
<katlogic> (Cue the usual joke of every second C program implementing its own hash tables)
<alexgordon> it occurs to me that a language need only call malloc once per function, if that
<katlogic> wat?
<alexgordon> I KNOW IT SOUNDS CRAZY
<katlogic> !!
<katlogic> U MADMAN
<katlogic> YOU DOING MALLOC EVERY FUNCTION CALL AND DOES NOT AFRAID OF ANYTHING
<katlogic> Though to be fair: STL does the sensible thing. If vector is static sized, it will do the right thing.
<alexgordon> katlogic: basically in C++ and all languages really, a lot of time is spend mallocating, and then freeing memory that only ever spans a one maybe two function calls
<alexgordon> and that's patently absurd
<katlogic> Rarely happens in properly written in C, though.
<katlogic> (especially as there is not even working malloc sometimes)
Determinist has quit [Quit: Textual IRC Client: www.textualapp.com]
<ELLIOTTCABLE> katlogic: wait, Rust is a higher-level language than C++
<ELLIOTTCABLE> wat?
<alexgordon> ELLIOTTCABLE: yeah it is
<katlogic> Dunno, it's hard to count novel languages as systems programming (compared to C++ where it is actually possible to compile to bare metal).
<ELLIOTTCABLE> news to me. I was looking at Rust as a C++ (and sometimes C) replacement.
<alexgordon> katlogic: thing is, most C programmers don't write "properly written" C all the time
<katlogic> ELLIOTTCABLE: Using C or C++ is silly unless you do systems programming. Waste of time.
<alexgordon> katlogic: they write meh C 90% of the time and write properly written C for the other 10%
<alexgordon> otherwise you'd go insane
<ELLIOTTCABLE> interesting.
<ELLIOTTCABLE> what do you define as “systems programming?” Just kernel dev or similar?
<alexgordon> C++ is great
<ELLIOTTCABLE> what about embedded stuff? what about compilers?
<alexgordon> don't listen ELLIOTTCABLE
<ELLIOTTCABLE> C++ is revolting, alexgordon ಠ_ಠ
<alexgordon> ELLIOTTCABLE: it's like a good hamburger
<katlogic> ELLIOTTCABLE: No, anything where you need *exact* control over memory. Think high-level assembler.
<cloudhead> system programming => stuff that isn't portable
<ELLIOTTCABLE> katlogic: and Rust isn't that?
<katlogic> No.
<ELLIOTTCABLE> forgive me, I know nothing of Rust yet.
<ELLIOTTCABLE> wow.
<ELLIOTTCABLE> I didn't realize Rust was memory-managed. Really surprised.
<cloudhead> it's unmanaged
<ELLIOTTCABLE> also hi cloudhead
<alexgordon> but it doesn't give you the control that C does
<cloudhead> hi
<purr> cloudhead: hi!
<ELLIOTTCABLE> -didja didja @ cloudhead
<purr> cloudhead: didja didja didjaaaaaaaaaaaaaaa … writeapawsyet?
<alexgordon> ELLIOTTCABLE: rust is somewhere between C++ and Java
<katlogic> ELLIOTTCABLE: Rust is manual, problem is abi.
<ELLIOTTCABLE> alexgordon: weird.
<katlogic> ELLIOTTCABLE: Unless you have clearly defined what happens underneath, you'll run into trouble.
<ELLIOTTCABLE> okay. back to #git.
Rusky has quit [Read error: Connection reset by peer]
Rusky has joined #elliottcable
Rusky has quit [Remote host closed the connection]
<katlogic> Also, using Rust without smart pointers is some real pain (and you'd have to do that to keep it really "manual")
<alexgordon> what would you want smart pointers for?
<katlogic> alexgordon: Rust has some syntac sugar for what basically boils to various types of C++ smart pointers.
<alexgordon> yeah I know
<alexgordon> isn't that enough?
<alexgordon> I don't use anything in C++ other than std::unique_ptr and std::shared_ptr
<alexgordon> which rust has
<katlogic> No, you really want to keep ARC away when doing anything close to metal :)
<alexgordon> let me rephrase, what kind of smart pointer would you design if rust supported them?
<katlogic> Rust smart pointers are ok for its intended purpose.
<katlogic> That would be app programming.
<katlogic> Unfortunately using rust on very low level is not really possible, compared to C++, or I just didnt look deep enough perhaps.
Rusky has joined #elliottcable
<katlogic> (My Rust knownledge is kinda ... rusty :)
<alexgordon> I dunno, I don't think there's anything that rust can't do that doesn't cover what I do in C++ most of the time
<katlogic> I was assuming the situation is like in D
<alexgordon> my main problem is that it's not high level _enough_
<katlogic> Ie it is doable, by using special syntax and abusing the language a lot.
<katlogic> alexgordon: How much high level you'd want?
<alexgordon> which is what I'm trying to do in furrow: abstract memory management more so that you can more aggressively optimize down
<katlogic> alexgordon: For higher level I'd look at Julia
<alexgordon> yeah... nah :P
<alexgordon> julia is alright for what it is
<katlogic> Memory management in C++ is doable only if you'll ditch STL ... ie C with classes.
<alexgordon> if I'm making an new language I can ditch STL and make my own
<katlogic> In that case even hybrid conservative (stack) / accurate (objects) GC is possible.
<alexgordon> most (all?) memory management is pretty straightforward
<katlogic> Which is common among various lisps compiling to C I believe.
<katlogic> alexgordon: Dunno, I'd say GC/ARC with elimination is one of the hardest parts to do right.
<katlogic> As in, not slow.
<katlogic> LLVM has some neat infrastructure to coalesce ARC for ObjC ... but one has to be using llvm directly, or compile to objc :/
<ELLIOTTCABLE> but seriously, git.
<ELLIOTTCABLE> but. seriously. git.
* ELLIOTTCABLE what are you smoking.
<katlogic> Felipe drama?
<katlogic> ah, meh
<purr\Paws> [Paws.js] ELLIOTTCABLE pushed 2 new commits to Master: https://github.com/ELLIOTTCABLE/Paws.js/compare/9c944c2f4364...245945c081e3
<purr\Paws> Paws.js/Master 0703716 elliottcable: (- re api) Store unboxed JavaScript strings in Labels
<purr\Paws> Paws.js/Master 245945c elliottcable: (- new api) Implement recursive Thing.construct
<cloudhead> katlogic: what do you mean by "very low level"
<cloudhead> I can't think of anything you can do in C but not in rust
<ELLIOTTCABLE> katlogic: hm?
<ELLIOTTCABLE> katlogic: the channel?
<ELLIOTTCABLE> cloudhead: I think he's speaking in terms of thought-abstraction, not in terms of capability.
<ELLIOTTCABLE> cloudhead: could be wrong.
<cloudhead> O.o
<cloudhead> thought abstraction?
<ELLIOTTCABLE> as in, rust isn't a direct abstraction on the assembler product …
* ELLIOTTCABLE shrugs
<purr> ¯\(º_o)/¯
<cloudhead> hm
<ELLIOTTCABLE> I don't know, I don't know Rust yet. >:
<cloudhead> it needs a better type system
<cloudhead> that's the only problem
<cloudhead> but I think it'll come
<ELLIOTTCABLE> complaints being?
<cloudhead> well, it uses certain abstractions which are very verbose unless you have a very powerful type system
<cloudhead> it needs higher kinded types mainly
<cloudhead> and just overall more flexibility in its generics
<cloudhead> it's kind of like it's half way in between a basic static type system
<cloudhead> and haskell's type system
<cloudhead> and that middle ground is not a good place to be
<katlogic> cloudhead: For example, exist without any runtime.
<cloudhead> katlogic: use-case?
<katlogic> Bare metal.
<katlogic> (OS kernels, whatever you want)
<cloudhead> well, that's not a problem is it?
<katlogic> cloudhead: But also generally necessity to carry rust runtime around might not be always possible.
<katlogic> cloudhead: Don't mistake good FFI support with low-level :)
<katlogic> D got that too. Still pain.
<cloudhead> D is managed though
<katlogic> So is Rust if you're about to start splitting hairs.
<katlogic> I dont care if it is refcounting or tracing.
<katlogic> Default mode is fairly high level.
<katlogic> Both languages offer to escape to unsafe.
<cloudhead> default mode only uses the stack
<cloudhead> how is that high level?
<katlogic> Huh?
<cloudhead> it doesn't make heap allocations
<cloudhead> unless you use boxed pointers
<katlogic> wat?
<cloudhead> ?
<katlogic> Let's say
<cloudhead> I can check the generated code
<katlogic> You want to have some um, structured data. With references.
<katlogic> You know, actual software, not toys :)
<cloudhead> yea
<katlogic> Rust is ARC.
<katlogic> On heap.
<katlogic> (The actual might be on stack in chicken fashion, though I doubt it, there are horrible problems with that)
<cloudhead> if you just define a struct and allocate it, it'll be on the stack
<cloudhead> that's why you have a special pointer kind for heap allocations
<katlogic> Not special, just smart pointer.
<katlogic> And yes, its equivalent to C++ more or less.
<cloudhead> yea, you don't have to use those if you need to avoid malloc
<katlogic> Anything which can be passed by value naturally can be on stack, but I dont see how is that relevant.
<cloudhead> well what do you define as the runtime then?
<cloudhead> it's relevant because it's like C in that respect
<katlogic> cloudhead: Using rust with #[no_std]; is tough, though.
<cloudhead> why would you need to do that?
<katlogic> Unfortunately you have to.
<katlogic> To get rid of task runtime.
<katlogic> Check out rustic, small kernel in rust.
<katlogic> (Which is example how to actually _do_ bare metal in Rust. And from where I frown "it is a bad idea".)
<cloudhead> yea I saw that
<katlogic> Ironically, there are still parts in C and assembler.
<katlogic> So its only the higher-level parts of kernel.
<katlogic> Its probably impossible to write it completely C-free.
<cloudhead> I guess yea you have to make some compromises in that case
<katlogic> People wrote kernels in CLOS and .NET this way.
<cloudhead> but it's really such a specific case
<cloudhead> general-purpose low-level programming should not be an issue
<katlogic> Again, I'm not dismissing it completely. Its just that Rust has this weird abi, micro tasks and what not.
<katlogic> Until recently split stacks were some serious wtf, etc etc.
<katlogic> C is small and stable, thats all I'm saying.
<cloudhead> yea for sure
<cloudhead> the thing is there are lots of domains which C/C++ were the only choice
<cloudhead> and now that's no longer the case
<katlogic> hm, rust-core looks pretty sweet tho
<katlogic> might try again how well it is useable
<katlogic> especially on sub-256k hw
<cloudhead> like real-time systems
<cloudhead> hehe
<ELLIOTTCABLE> hi all
<cloudhead> it's unclear to me though what the runtime does
<cloudhead> if one uses libnative for ex
<katlogic> cloudhead: Closures are still tricky.
<katlogic> But otherwise it looks fairly lightweight
<katlogic> Rust seems to have killed lots of dead weight since I looked at it last time.
<cloudhead> yea, it's changing every other day
<cloudhead> I still wish the Option<T> story was better
<cloudhead> with for ex monads
<cloudhead> but it's surprisingly good
<katlogic> Bleh, rust-core is some serious hoops tho.
<cloudhead> what is the idea behind rust-core?
<cloudhead> a more lightweight stdlib?
<katlogic> Ditch all runtime, rewrite from scratch.
<cloudhead> ah I see
<katlogic> Kinda like musl vs glibc
<cloudhead> yea yea
<katlogic> also this kinda sucks https://github.com/thestinger/rust-core/issues/31
<katlogic> (one needs this to implement limited pools with retry in memory constrained environments)
<ELLIOTTCABLE> katlogic: musl?
<katlogic> or newlib
<ELLIOTTCABLE> rust-core? is that an alternative project by somebody else, or a rewrite-branch kinda thing?
<katlogic> or uclibc
<ELLIOTTCABLE> I know what none of these things are, because I'm not a low-level dev. (=
<katlogic> Basically whenever you cant afford decent host environment.
<katlogic> Which may be even things like android or iphone.
<katlogic> (Note that rust-core still obviously depends on libc, its just that it does not carry ton of cross-dependencies like rust normally does)
<katlogic> Ok, let's see if this sucker will static link...
<cloudhead> katlogic: custom allocators are coming though
<cloudhead> before v1
<cloudhead> fwiw
<ELLIOTTCABLE> git :D
<ELLIOTTCABLE> such a love
<alexgordon> ah back
<vigs> ELLIOTTCABLE: http://jsdb.org; it's a lame-o js interpreter
<ELLIOTTCABLE> vigs: hi
<alexgordon> elliott!
<ELLIOTTCABLE> alexgordon!
<ELLIOTTCABLE> I'm writing some maintenance shit
<ELLIOTTCABLE> every time I do so, I think of you (=
<ELLIOTTCABLE> currently: git hooks.
<alexgordon> ELLIOTTCABLE: LOL
<purr> LOL
<alexgordon> ELLIOTTCABLE: why aren't you using python?
<ELLIOTTCABLE> not a fan of python.
<ELLIOTTCABLE> or, for that matter, of high-level programming languages for simple tasks.
<alexgordon> ELLIOTTCABLE: what, bash is lower level than python? lol
<purr> lol
<ELLIOTTCABLE> Shell-script is a perfectly passable solution, a skill *every* programmer should engender, and is faster, lighter, and requires less of the user/collaborator/spelunker.
<ELLIOTTCABLE> alexgordon: no, bash isn't a programming language.
<alexgordon> ELLIOTTCABLE: erm, yes it is
<ELLIOTTCABLE> I consider ‘scripts’ to be a different thing from ‘programs.’
<ELLIOTTCABLE> Sure, you can write a file-server in bash, but that doesn't mean bash is *ideal* for that task;
<ELLIOTTCABLE> and sure, you can write a five-line script in Python, but that doesn't mean Python is *ideal* for that task.
<alexgordon> all scripting languages are programming language, a programming language is some turing complete system for executing computations (which bash is)
<ELLIOTTCABLE> If I was writing simple tasks for my own use, then I'd probably use ruby. Easier, faster, etceteras.
<alexgordon> ELLIOTTCABLE: dude get out of your head and try using python :P
<alexgordon> it works better™
<alexgordon> ok ruby then
<alexgordon> anything but bash
<ELLIOTTCABLE> But anything I'm sharing with anybody else? **Especially** additional tasks or meta-shit associated with a project *not* in Ruby (or Python, for you)? Hell no I'm not going to require the user to install or deal with python.
<ELLIOTTCABLE> No.
<alexgordon> like in python you do
<ELLIOTTCABLE> yes, I'm aware, bro.
<ELLIOTTCABLE> You're not listening to me.
<alexgordon> output = check_output(['program', 'arg1', 'arg2', 'arg3'])
<ELLIOTTCABLE> The “anything but bash” for a non-Ruby, non-Python, non-Perl projects, is the language itself; and usually, that language is not suited to such tasks.
<alexgordon> it's so controlled
* ELLIOTTCABLE sighs
<ELLIOTTCABLE> Not having this argument.
<ELLIOTTCABLE> for JavaScript projects, I will continue to write my relatively trivial tasks as POSIX-compatible shell scripts. I have good reasons, whether you'll listen to them or not.
<alexgordon> I don't understand your reasoning
<ELLIOTTCABLE> Have you ever installed a program, gone to modify the source, and discovered that you have to wrangle <insert other language's package installer here> just to run the tests, or just to compile the source?
<alexgordon> one of python's main uses is as a scripting language for people making games
<alexgordon> in C++
<ELLIOTTCABLE> Canonically, CPAN or Perl, but if you're an actual perlista, that's not sufficiently scary-sounding.
<ELLIOTTCABLE> you're missing my point.
<alexgordon> just because you're using C++ doesn't mean you can't use python to automate your own tasks
<ELLIOTTCABLE> I didn't say they're not *scripting langauges*. There's a break-down of language, here.
<ELLIOTTCABLE> Yes, I'm completely fucking aware. Ugh.
<alexgordon> [22:36:30] <+ELLIOTTCABLE> Have you ever installed a program, gone to modify the source, and discovered that you have to wrangle <insert other language's package installer here> just to run the tests, or just to compile the source?
<alexgordon> personally I'm much happier when I find the thing is held together by python scripts than by shell scripts
<ELLIOTTCABLE> yes.
<ELLIOTTCABLE> because you know python.
<alexgordon> shell scripts = nobody fucking knows how it works
<ELLIOTTCABLE> That's my fucking point.
<alexgordon> ELLIOTTCABLE: even if it's held together by ruby, I'm happier
<alexgordon> and I don't know ruby
<ELLIOTTCABLE> What if it's held together by JavaScript scripts, targeting Grunt?
<ELLIOTTCABLE> and you don't know any of those languages or toolsets?
<alexgordon> I can work out ruby, with 10 minutes and a web browser. shell scripts are completely impossible whether you know how to write them or not
<ELLIOTTCABLE> What if, to install it, you have to set up your system for npm? What if npm is hugely a pain in the ass to install and configure?
<alexgordon> reading a shell script is like reading a regex
<ELLIOTTCABLE> You don't *need* to read them. They're project-management shit.
<alexgordon> ELLIOTTCABLE: ok but everybody has ruby and python installed, and if they don't, it's dead easy to do so
<ELLIOTTCABLE> The user-experience of a shell script associated with a project is *not* its source-code; they are rarely, if ever, modified. The user-experience is the effort required for a new contributor to start contributing.
<ELLIOTTCABLE> “everybody”
<ELLIOTTCABLE> no[e.
<ELLIOTTCABLE> nope.*
<ELLIOTTCABLE> “dead easy”
<ELLIOTTCABLE> nope.
<ELLIOTTCABLE> *Especially* nope, lol.
<purr> lol
<alexgordon> ... even if you're using windows there's a GUI installer for python
<ELLIOTTCABLE> You say that because you know Python well. And you say that because you've dealt with Ruby before, and forgotten how hard it was the first time.
<ELLIOTTCABLE> Oh, yes, because ease-of-use for a developer is having a GUI installer available! Clearly!
<ELLIOTTCABLE> Python's a goddamn nightmare for somebody who doesn't know it.
<alexgordon> well your shell scripts certainly aren't going to work on windows anyway ;)
<ELLIOTTCABLE> Not as bad as CPAN, but … if I see a project, and wish to contribute or patch or fix a bug or even spelunk, I will goddamn walk away if the README says I have to run a python command to do so.
<ELLIOTTCABLE> anyway. off to continue writing my robust, simple shell-scripts that don't require the user who's just git-cloned the project to install any further software to use them.
<alexgordon> ok, I'll continue to think poorly of anybody still using fucking shell scripts in 2014
<ELLIOTTCABLE> The friendliness to simple, shell-script based project-management frameworks/systems, is one of the only things I like about npm.
<ELLIOTTCABLE> It gets this shit *right*.
<ELLIOTTCABLE> “<tool> has no use-case, and should universally be replaced by <bigger, more complex, and more multi-purpose tool> in all cases, forever!”
<ELLIOTTCABLE> — C++ users
<alexgordon> that would be FINE if shell scripts were any good
<alexgordon> but you yourself admit that they suck
<ELLIOTTCABLE> brb abandoning all of the tasks for which C, shell-scripts, non-WebSocket HTTP requests, and `nano` are useful for.
<ELLIOTTCABLE> Huh? I never said they suck. I said writing them is a *huge* context-shift from working in any sort of programming-language.
<ELLIOTTCABLE> Surprisingly, client-side-JavaScript–to–shell-script is probably the least context-shift possible. Writing either is primarily an effort of compatibility.
<ELLIOTTCABLE> glowcoil: darp
glowcoil has quit [Remote host closed the connection]
glowcoil_ has quit [Read error: Connection reset by peer]
<ELLIOTTCABLE> ಠ_ಠ
Rusky has quit [Quit: Leaving.]
Rusky has joined #elliottcable
manveru has joined #elliottcable
<manveru> yorickpeterse: yo :)
<ELLIOTTCABLE> manveru!
<fwg> <+ELLIOTTCABLE> Surprisingly, client-side-JavaScript–to–shell-script is probably the least context-shift possible. <<< you cannot be serious!
<fwg> shell script is arcane black magic
<manveru> i just wanted to say the same about js :)
<manveru> then again, they are pretty much around the same wtf/m
<fwg> haha
<manveru> anw, off to bed, nice to see you again
<ELLIOTTCABLE> manveru: sleep well
<ELLIOTTCABLE> manveru: lurk moar <3
<ELLIOTTCABLE> 5:20 PM <manveru> then again, they are pretty much around the same wtf/m
<ELLIOTTCABLE> fwg: but seriously!
<ELLIOTTCABLE> most of the wtf's in shell-scripting are either A) forgetting the basic nuts-n-bolts abstraction of shell scripts, which is STRINGS R EVERYTHAN', or B) writing crap scripts that stop working as soon as you try to run them on another system.
<ELLIOTTCABLE> which pretty much describes most non-experts' woes with JavaScript: A) not properly understanding prototypal inheritance or coercion, coming from Ruby or Java or whatever; and B) writing bad JS that stops working as soon as somebody accesses it with a two-year-old version of their browser.
<katlogic> When people complain about JS being arcane ball of hacks, unix shell is indeed vicious retort.
<katlogic> (It is interesting to learn history of unix shell since early 80s)
<fwg> ELLIOTTCABLE: so you are saying that because you are constantly shooting your left foot, you should definitely start shooting your right as well, because the new pain will only need so little context shift?
<katlogic> Then again, prototypes as done in JS is something horrid. Schoolbook example how to not clone smalltalk / self.
<fwg> __proto__ to the rescue :/
<katlogic> yay for Object.create (not!)
<ELLIOTTCABLE> 5:34 PM <fwg> ELLIOTTCABLE: so you are saying that because you are constantly shooting your left foot, you should definitely start shooting your right as well, because the new pain will only need so little context shift?
<ELLIOTTCABLE> not at all.
<ELLIOTTCABLE> Just saying that being shot in the right foot is the most similar pain to having been shot in the left foot.
<ELLIOTTCABLE> :P
<ELLIOTTCABLE> Statement of situational fact, not suggestion.
<katlogic> Dunno how JS is even remotely related to unix philosophy tho.
<katlogic> Since only existing ecosystem for JS is Node, and async stuff is awkward fit for unixish everything-is-file / pipes.
<katlogic> (perl or python come closer simply by being pipe friendly and having vast array of libraries too)
<fwg> ELLIOTTCABLE: what about just bundling your dependencies... then future contributors/users won't have to set things up via <package management>
<fwg> npm for example has the awesome shrinkwrap command
<fwg> ELLIOTTCABLE: that's the main pain point you are having against a more fancy language instead of shell scripts, right?
<ELLIOTTCABLE> hm, not exactly
<ELLIOTTCABLE> it's *mostly* (let's say 80%) installation,
<ELLIOTTCABLE> but also somewhat spelunking.
<fwg> I had to look up that word. please elaborate :)
<ELLIOTTCABLE> as alexgordon insists, yes, reading a shell-script as a spelunker is way more obstruse than reading equally-carefully-written Ruby (i.e. I can make a Ruby script much more spelunker-friendly than I can a shell-script, with the same amount of effort)
<ELLIOTTCABLE> *but*, reading <arbitrary language I don't know anything about> is, in my estimation, *even worse than reading shell-script*. No matter how well-written the arbitrary-language source is.
<ELLIOTTCABLE> So, the pervasive knowledge of the command-line makes anything written in similar language very attractive.
<alexgordon> ELLIOTTCABLE: rut
<alexgordon> ELLIOTTCABLE: most languages are extremely similar, if you know one you know them all
<ELLIOTTCABLE> Disagree immensely.
<alexgordon> I don't do much java, but I can work out what java does
<ELLIOTTCABLE> They're *similar*, but not *similarly easy to read*.
<alexgordon> I don't know much ruby but I can work out what ruby does
<ELLIOTTCABLE> Too much boilerplate, syntax, and NIH involved with any language community for that to be remotely true.
<alexgordon> shell scripts.. no fucking clue
<katlogic> ELLIOTTCABLE: Case in point: TCL
<ELLIOTTCABLE> sure, 'cuz Ruby is easy. And Ruby would definitely be my second choice behind shell-scripts for such a task.
<katlogic> We can all agree how well that fared
<ELLIOTTCABLE> But Perl? or Python? or Java? Fuckno.
<katlogic> (not exactly well)
<ELLIOTTCABLE> katlogic: I actually haven't the slightest clue what tcl/t<whateveritwas> are.
<katlogic> TCL was supposed this shell-ng
<ELLIOTTCABLE> I hear the terms occasionally, but it's like GNU shit to me: some strangely insular community, involving a project that's irrelevant to the real-world as far as I can tell.
<katlogic> Nah, you're too closed in your hipster Ruby/JS bubble. TCL was pretty popular in early 90s. Then perl came along.
* ELLIOTTCABLE nods
<ELLIOTTCABLE> that was long before my time, so like I said, I know little about it.
<ELLIOTTCABLE> (interesting that you say that; whitequark likes to accuse me of almost exactly the same thing.)
<katlogic> Likewise my arguing with archeology does not hold much water in this day and age.
<ELLIOTTCABLE> wat
<fwg> perl is actually kind of nice, I have found. if you get past the access qualifiers $%@
<alexgordon> ewww
<ELLIOTTCABLE> fwg: I don't dislike the language as many do.
<ELLIOTTCABLE> I just think it's a motherfucking terrible choice for writing scripts that anybody else, anywhere, will ever see.
<katlogic> Perl will eventually die. I'm really afraid JS is where stuff will be at. You know, lowest common denominator sort of stuff.
<alexgordon> perl is like a good shit
<fwg> hahahaha
<ELLIOTTCABLE> katlogic: I love JS, and I'm totally pro-that-outcome.
<alexgordon> it's been flushed ages ago but the smell still hangs around
<ELLIOTTCABLE> alexgordon: “perl is like a good shit. it's been flushed ages ago but the smell still hangs around.” wat.
<purr> beep.
<katlogic> ELLIOTTCABLE: As far as scheme-family go, JS is freaking trainwreck.
<ELLIOTTCABLE> scheme-family?
<katlogic> But it is still scheme-family, so better than nothing.
<katlogic> You haven't noticed? :)
<ELLIOTTCABLE> since when is JavaScript a lisp-family language?
<katlogic> Not syntactically, but semantically.
<ELLIOTTCABLE> can-be-used-functionally, sure. That's about the only connection I see.
<alexgordon> I actually prefer PHP to perl, that's how bad perl is
<ELLIOTTCABLE> I care little about semantics; I'm asking how you see that connection in terms of semantics :P
<ELLIOTTCABLE> if perl is a good shit, then PHP is a bad shit.
<fwg> if only JS were more like Scheme
<ELLIOTTCABLE> also, my OS X consistently auto-corrects PHP to Php. ಠ_ಠ
<ELLIOTTCABLE> katlogic: genuinely curious! elaborate at me!
<katlogic> ELLIOTTCABLE: Anything with proper not-so-broken scoping semantics is basically scheme in my book.
<alexgordon> fuuuuuuu this function is 75% comments and 25% actual code
<katlogic> Unfortunately many modern languages broke that shit horribly.
<ELLIOTTCABLE> Interesting.
<katlogic> Whereas ES6 goes the right direction with let
<katlogic> (ie made it block level as it should be)
<ELLIOTTCABLE> We have a particular brain-abstraction we throw around in here to describe the programming environment we live in, called “oases”
<fwg> finally
<ELLIOTTCABLE> so I parsed your scheme-family in those terms. But I see what you mean, in this case.
<ELLIOTTCABLE> what's the argument for block-scoped variables?
<ELLIOTTCABLE> I've always considered them fairly pointless. Enlighten me.
<fwg> function scope is THE major wtf for JS IMO
<katlogic> ELLIOTTCABLE: By scheme family as in, writing schemesque-language-to-js transpiler is not terribly difficult. Things map relatively easily. Try that with python.
<katlogic> fwg: Unfortunately for python too.
<katlogic> Can be workaround by having every block as lambda, but meh.
<katlogic> Viva la let
<fwg> haven't done a lot of python, that makes me not want to go there
<katlogic> (ie got rid of _all_ vars and rewrote all functions to let name = function() the second ES6 let landed in V8)
<ELLIOTTCABLE> fwg: … again, how so?
<katlogic> fwg: problem with python is that you _cant_ easily nest functions like in js, so that workaround does not really work either
<fwg> ELLIOTTCABLE: have you never fucked up your internal representation of what was going on in your JS by variable hoisting?
<katlogic> so ... you're pretty much stuck with broken scoping in python
<ELLIOTTCABLE> oh, *hoisting* is fucking terrible
<ELLIOTTCABLE> but what's bad about not having *block*-local variables?
<fwg> no, the problem is that ALL vars are not block-local, but instead function-scoped
<katlogic> For one, assisting compiler so it does not have to make hoist guesses. Second, encapsulation.
<katlogic> Like I accidentaly variable I set god-knows-where in deep scope
<ELLIOTTCABLE> again, I don't see what's wrong with the variables' scoping; only with the fact of hoisting.
<ELLIOTTCABLE> If you leave hoisting in, and add block-local variables, all you've managed to do is slightly tighten the scope in which your mind can become fucked, in some cases. Hoisting is still just as unintuitive to the user when it happens.
<katlogic> ELLIOTTCABLE: The problem is simply vars from inner block magically appearing on upper levels and introducing bugs there.
<alexgordon> yah
<ELLIOTTCABLE> that's only a problem if the user is coming from a language with block-local variables.
<alexgordon> that bites me in python all the time
<alexgordon> ELLIOTTCABLE: no e.g. I'll set a variable in a loop but forget to initialize it before the loop
<ELLIOTTCABLE> I don't see variables being local to arbitrary sub-units of code as being particularly intuitive; and if you don't have any preconceived notions of “this variable is specific to my for-loop!” from some other language, it's not remotely confusing.
<katlogic> ELLIOTTCABLE: Well, uh, most sane languages have proper lexical scoping
<alexgordon> then I get variables from the previous outer loop
<katlogic> broken languages, like php, js or python dont
<katlogic> easy as that
* katlogic likes his little monochrome world
<katlogic> not schemescque lexical scopes, you're out
<ELLIOTTCABLE> In fact, I think it's *extremely* intuitive, and easing-to-the-mind of newcomers, for there to be exactly one sort of scope.
<ELLIOTTCABLE> ♪ Booty Swing, Parov Stelar
<purr> ELLIOTTCABLE is listening to “Booty Swing”, by Parov Stelar
<ELLIOTTCABLE> -standing desk
<ELLIOTTCABLE> -find dancing
<purr> ELLIOTTCABLE: Could not find `dancing`.
<ELLIOTTCABLE> hm.
<ELLIOTTCABLE> -learn standing desk = don't you mean ‘dancing desk?’
<purr> ELLIOTTCABLE: Learned `standing desk`.
<katlogic> ♪ Alec Troniq, Fluffernutter
<purr> katlogic: Song not found. ):
<katlogic> purr obviously hates german hipster music
<ELLIOTTCABLE> :P
<alexgordon> ELLIOTTCABLE: I think the opposite
<katlogic> purr: ow common, its even on itunes
<alexgordon> ELLIOTTCABLE: programming is hard, it's better to start people off on C, to weed out the people who can't handle it
<ELLIOTTCABLE> katlogic: the syntax is usually the problem. I should just strip all special characters before sending it to tiny song.
<alexgordon> no point lying to people
<ELLIOTTCABLE> -song Alec Troniq
<purr> ELLIOTTCABLE: “Droid (Alec Troniq Remix Edit)” by Hypnosis: <http://tinysong.com/TFCX>, “Passengers” by Alec Troniq: <http://tinysong.com/qDbT>, “doldrums” by alec troniq: <http://tinysong.com/1cLw0>
<katlogic> alexgordon: Infinite monkeys counter-retort?
<ELLIOTTCABLE> -song Alec Troniq Fluffer
<purr> ELLIOTTCABLE: Song not found. ):
<ELLIOTTCABLE> hm
<katlogic> ELLIOTTCABLE: Let me guess, it probes only grooveshark?
<ELLIOTTCABLE> katlogic: have you written a Paws yet?
<ELLIOTTCABLE> katlogic: yep
<alexgordon> the idea of "educational languages" is just misplaced
<ELLIOTTCABLE> tiny song has a nice API, but it's *by* the Grooveshark people
<katlogic> I think you asked already, not Paws believer yet.
<ELLIOTTCABLE> die alexgordon
* alexgordon dies
<ELLIOTTCABLE> katlogic: oh, expect me to ask a couple times a day. ;)
<ELLIOTTCABLE> “Go write a paws” is my favourite salutation.
<ELLIOTTCABLE> it's like an 80%-scheme; it's a trivial task.
<katlogic> alexgordon: Anyway, the theory goes like: if you have infinite number of monkeys pounding JS away as npm modules, eventually something good comes up
<katlogic> So the quest is to not educate quality coders, but get infinite monkeys
<alexgordon> katlogic: hasn't happened yet
<katlogic> For that, you need monkey-friendly language
* katlogic thinks he is really offensive towards js now
<katlogic> But thats where it is, it happened to Perl too
<katlogic> PHP is perl for monkeys
<fwg> then comes the network effect and you get shit swimming on the surface
<ELLIOTTCABLE> man, you guys are so offensive to my sensibilities.
<ELLIOTTCABLE> fuckin' programmers. :P
<alexgordon> the only languages I've ever had fun using are
<alexgordon> 1. python, 2. haskell
<katlogic> fwg: Indeed, you'll get immense ocean of monkey piss npm is now
<alexgordon> the rest are shitebaskets
<katlogic> fwg: But in there, occasionaly drop of water shows up
<fwg> katlogic: it spans for miles and miles
<fwg> oh god the freshwater has run out
<fwg> James has started to gnaw on his toes
<alexgordon> oh fuck oh fuck I'm sitting on a chair
<fwg> I think I'll go mad if we don't see land in the next 7 days
<katlogic> Anyways, I think this does not extend only to PL, but human cultures in general.
<katlogic> Its the ultimate counter-elitist argument.
<fwg> the monkey argument?
<katlogic> Yup
<katlogic> Breed monkeys, some will wise up.
<katlogic> More monkeys, more wise monkeys.
<fwg> simple statistics :)
<ELLIOTTCABLE> er
<katlogic> I think there is some factor of diminishing returns though
<ELLIOTTCABLE> that's not counter-elitist, that's fuckin' extremely *elitist*.
<ELLIOTTCABLE> ಠ_ಠ
<katlogic> As number of monkeys increase, so does the backwards monkey culture.
<katlogic> Useless memes proliferiate more and infect otherwise healthy monkey individuals.
<ELLIOTTCABLE> I think I'm expanding the set of banned topics in this channel to “<x> group of people shouldn't be allowed to program.” Or anything else particularly exclusionary.
<katlogic> ELLIOTTCABLE: Elitist would be to say: I am not a code monkey.
<katlogic> Frankly, I am.
<ELLIOTTCABLE> alexgordon: -v
<purr\Paws> [Paws.js] ELLIOTTCABLE pushed 1 new commit to Master: https://github.com/ELLIOTTCABLE/Paws.js/commit/0e7365734047bafda1f566fbb31cf7a5614d470e
<purr\Paws> Paws.js/Master 0e73657 elliottcable: (new meta) Provide useful git-hooks for contributors
<alexgordon> ELLIOTTCABLE ?
<purr\Paws> [Paws.js] ELLIOTTCABLE force-pushed Master from 0e73657 to 8623c53: https://github.com/ELLIOTTCABLE/Paws.js/commits/Master
<purr\Paws> Paws.js/Master 8623c53 elliottcable: (new meta) Provide useful git-hooks for contributors
<ELLIOTTCABLE> sudden, illogical desire to create a toy language in which you code by drawing in MSpaint.
<ELLIOTTCABLE> Paint tools as syntax.
<ELLIOTTCABLE> Well, it's storming outside. Looks intense.
<ELLIOTTCABLE> glad I'm inside, listening to Petey Pablo, and writing code.
<alexgordon> fuuuuuuu
yorick has quit [Remote host closed the connection]