Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
crazypenguin
Mar 9, 2005
nothing witty here, move along

Suspicious Dish posted:

its bcuz of x11 stupidity and i can explain it if u want

what do you think it is?

My guess would have been they're doing an expensive (lol) menu draw for every single "the mouse moved 1 px" event, which they get a large queue of because they're not handling events properly. But that's not really x11 stupidity, so what's your guess?

Adbot
ADBOT LOVES YOU

crazypenguin
Mar 9, 2005
nothing witty here, move along

Internaut! posted:

yea but doesnt minecraft pin a modern machine while rendering like 1000 cubes with low res textures

if that's best case java graphics then I don't think it's gonna take over from c++ anytime soon

every laughs about 8-bit textured cubes, but minecraft is a 100% mutable world with no offline computation of lighting or space partitioning trees or any poo poo like that.

I don't think there is a modern game engine that could do that without falling over and dying.

crazypenguin
Mar 9, 2005
nothing witty here, move along

horse mans posted:

of course there's space partitioning, the whole world is divided into chunks

i mean of the type that lets you avoid drawing vast swaths of the world because they aren't visible.

like, minecraft draws all the caves below you. it doesn't try to figure out that you can't see them from the surface.

it sounds stupid, but as far as I've been able to tell, everyone who has tried to make it avoid attempting to draw those caves has wound up with a slower renderer.

Bream posted:

Also serious q. are Minecraft's octrees sparse? What about in the woods with no one around?

Unless I've been seriously misinformed, it doesn't use octrees.

crazypenguin
Mar 9, 2005
nothing witty here, move along

JawnV6 posted:

not that i wanna get into this but it really looks like you're praising a lovely brute force method with slack-jawed amazement

me? wasn't praising anything, except maybe the jvm. the jvm is pretty sweet. 8-bit textured cubes belies how hard it is to render fully dynamic scenes is all.

horse mans posted:

that's not a lack of space partitioning, that's a lack of occlusion

a rendering engine typically uses a space partitioning of the static parts of a scene to do occlusion.

crazypenguin
Mar 9, 2005
nothing witty here, move along
I don't get the Haskell runtime type checking thingy. why do you want it?

I'm not knocking on dynamic types here, I just legit don't know what you'd want it in Haskell. I can't remember a single type error I've ever gotten from Haskell that wouldn't just be an immediate crash when that code got run.

the wiki just says its sometimes useful during development, but doesn't actually say when. so... is it just a way to not comment out broken code you don't intend to run at the moment?

crazypenguin
Mar 9, 2005
nothing witty here, move along

yaoi prophet posted:

this is one use for it, yeah. obviously if you actually use it in real code you're an idiot but if you can't get the types to match and you have no clue why firing up ghci with -fdefer-type-errors and playing around with types is a good way to figure out what's going on

that makes sense. you'd get some of that from an IDE that could tell you what types were inferred for things right?

tef posted:

if you're going to turn up late to the party, at least catch read stuff, or perhaps, you might understand that not everyone makes the same broken errors as you

the last time it came up over a year ago, it has similar responses and similar explanations

yeah, I'm guilty of looking at their wiki for an explanation, rather than the papers. Those papers do, eventually, get into decent motivation.

The part that had me confused is that Haskell doesn't have real late-binding, like OO languages do with dynamic dispatch. So in the DuctileJ paper, on page 2 where they lay out their principles, Haskell doesn't get any benefit from principle #2.

That is, a type incorrect DuctileJ program can hit a (static) type error and figure out everything is okay at runtime, and just keep running. That doesn't happen at all for Haskell. In Haskell, if you try to run that code that has the static type error, the program just dies with the type error, always.

But anyway, it makes sense now.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Null Pointer posted:

2 MB compiler.y file.

does this mean they aren't even getting as far as having an abstract syntax?

crazypenguin
Mar 9, 2005
nothing witty here, move along

Null Pointer posted:

of course not. most courses are still based on some pl/0 dialect specifically because it can be compiled in a single pass which a lot of people think is easier for learners. ofc they tweak it just enough to fight plagiarism, with a few bonus sr and rr conflicts thrown in to give the A students something to do.

this sounds awful.

I did compilers with appel's tiger book. I guess I didn't realize how good that is.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Vanadium posted:

ghci> data Prelude = Prelude Int deriving Show
ghci> Prelude . succ $ 42
Prelude 43
ghci> Prelude.succ $ 42
43


actually I'm curious how many people think this is a bad thing or confusing?

because there's a few other common ways people want this sort of thing. like to allow dash-in-identifiers, despite subtraction.

crazypenguin
Mar 9, 2005
nothing witty here, move along

ultramiraculous posted:

they tried, really hard, and got into some massive type-erasure tarpit. they couldn't find an intersection between clr type hacks and jvm type hacks and the project stalled.

this sounds interesting. got a link to something with details?

crazypenguin
Mar 9, 2005
nothing witty here, move along

Condiv posted:

is this typical of lexically scoped closures or is it just javascript being poo poo?

it's really hard to avoid when a closure can capture mutable state. basically what tef said.

so haskell doesn't have this problem (see: "lambda lifting") and java doesn't have this problem with locals, either.

I'm not sure what scala's doing, unless it's implicitly turning the mutable variable into a "final Mutable<Integer>" or something inefficient like that, in which case it's probably also lambda lifting, and won't have the problem.

crazypenguin
Mar 9, 2005
nothing witty here, move along

yaoi prophet posted:

i always wondered if there's a nice shorthand for lambda x: x.foo or e => e.foo or whatever, or is it just not worth the trouble

I use a little academic language where that's (.foo) and it's pretty nice

can look a little weird though sometimes when you're writing map((.foo), whatever)

crazypenguin
Mar 9, 2005
nothing witty here, move along

FamDav posted:

koenig lookup is more powerful

I have no idea why this keeps getting said. are you guys just looking at typeclasses as only a name overloading mechanism or something?

typeclasses also do abstraction (they're way more like concepts than koenig lookup), and even if limited to name overloading, you also get overloading on return type in addition to argument types.

so I'm not sure in what sense it's "more powerful"?

crazypenguin
Mar 9, 2005
nothing witty here, move along

Posting Principle posted:

its cool how a medium sized scala app can generate more classes than are in the entire jre

not really scala's fault. jvm sucks hard at closures, they all have to be their own classes.

Java 8 lambdas are "solving" this problem by using all that invokedynamic stuff they added for dynamic languages to turn a static method into a class at runtime instead of having to emit a .class at compile time.

I really don't know how they decided that was a good solution.

crazypenguin
Mar 9, 2005
nothing witty here, move along
it's as easy to dump on c++ as it is to make fun of php or perl.

my biggest gripe is that it's almost impossible to parse. oh sure, c committed the original sin of needing name binding information to parse, but c++ ramps that all the way up to needing type check everything as it is parsed. and on top of that, it's still ambiguous, and you have to speculatively parse things and backtrack when it doesn't work out

Brain Candy posted:

you have a minefield of corner cases that you hope people were not stupid enough to use. but they did, and you can't tell at a glance.

it's impossible to do safe refactoring of c++. rename a function? oops, it was called in a template somewhere, and a refactoring engine can't know that those two names were meant to be the same, since it was resolved at the template instantiation site via koenig lookup.

crazypenguin
Mar 9, 2005
nothing witty here, move along

coffeetable posted:

like you said they can at most solve problems in PSPACE, and the inclination in the field at the moment is that they're almost certainly in NP too.

This is worded confusingly, so I just want to clarify: quantum computers probably can't solve NP-complete problems any better than classical ones.

there's only like 5 useful quantum algorithms, and nobody can prove those problems aren't just in P anyway.

quote:

in fact, while no-one's expecting it i don't think anyone would be ~too~ surprised if it turned out that BQP = BPP and they're only as powerful as probabilistic computers.

Oh people would be surprised by that result. a lot. it'd be the biggest result in physics since the Higgs boson in the 60s, for one thing.

It's just possible, that's all. vastly more possible than P=NP. There's also a lot of people who want it to be true, because it would suit their philosophical inclinations about the nature of reality.

Actually, the one theorists are starting to suspect is P=BPP thanks to some relatively recent results in random number generators.

crazypenguin
Mar 9, 2005
nothing witty here, move along
As long as we're having gnome chat with an insider, any chance of that whole "grouping windows by application" experiment being considered a failure, so we can have alt-tab back, and not alt-` and alt-esc (which doesn't show the window list) and all that garbage?

It really seems like they redesigned alt-tab around people who don't use alt-tab, ruining it for those who do. It's impossible to build a mental model of what's going on with the grouped windows, so you just plain can't use it quickly. Most of my interactions went from a 200ms unthinking thing to a 10 second ordeal where I give up and use the mouse, and angrily try to figure out what I was even doing.

btw, I went looking for that ctrl+alt+t shortcut you said firefox had that caused trouble for a default open terminal shortcut, and it doesn't seem to have one, at least anymore, as far as I can tell.

crazypenguin
Mar 9, 2005
nothing witty here, move along

kraftwerk singles posted:

microsoft does lots of cool research and has tremendous talent but their labor never sees the light of day. maybe it all goes to patents?

the central problem for cs academics is that there's a fundamental tension between trying to do actual, real, lasting work on research, while making sure you're not just working on irrelevant crap about the latest fad tech that won't matter even two years later.

I think things are currently dominated by people who got a giant inferiority complex from people telling one too many jokes about "fields with 'science' in the name not being science lol." consequently, if you're not so far off into la la land that you're not confronting real problems, it's not considered "research."

and if you're ignoring the real problems, people in practice tend to get pretty dismissive of you.

I don't really wish PL CS work had less type theory, I just wish there were more of a place for "how the gently caress should we design string abstractions and libraries because loving unicode gently caress"

crazypenguin
Mar 9, 2005
nothing witty here, move along
if you mark intsToAges as inline, it'll probably be fused away and be free again.

I agree that 'probably' is a problem, though. guarantees are nice.

also what fix are you talking about? is it going to recognize that 'Age' is really just 'id' and rewrite away 'map id'?

crazypenguin
Mar 9, 2005
nothing witty here, move along

motedek posted:

is there an ide to write all the scala boilerplate? i'm curious about it but gently caress if i'm going to write stuff like this:

as much as I hate scala and implicits, a lot of that boilerplate is stuff written in libraries so you don't have to write boilerplate to use them.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Mr Dog posted:

Rust is basically Go except better so wait for Rust 1.0 to come out

Nah. Go is the bare minimum language necessary to write backend web stuff. It's why they don't give a poo poo about things like exceptions, because you can't propagate them across sockets anyway, and the real program you're working on is that larger distributed system. Unless you're working on web backend stuff, Go is definitely the wrong choice.

I've gotten a lot more skeptical of Rust the more I've learned about it. I no longer have any idea why it'll be any better than D. It would have been pretty great if they'd resisted the temptation to gently caress it up with macros and poo poo.

But I hate all programming languages so maybe I'm just a pessimist

crazypenguin
Mar 9, 2005
nothing witty here, move along

Shaggar posted:

mvc is really good and solves a bunch of problems

fwiw, i'm not sure what you described was actually mvc

but i think it sounds like a good way to structure web apps, and I really despise arguing about definitions, so...

crazypenguin
Mar 9, 2005
nothing witty here, move along
presumably they want it to work for the full language, not just a restricted subset of the language like hiphop.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Subjunctive posted:

all languages start out having a single implementation; do you believe that languages should not have specifications, but just "grab the tarball of jvm/gcc/etc. and try it"?

I used to think specs mattered the most, then I wrote a C compiler frontend.

Now I think an open source canonical implementation and good test suites are a whole lot more useful than a spec.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Subjunctive posted:

is Muchnick considered a good compiler book still?

It's pretty low-level optimization heavy sort of book, which I think is a downside. Like how dragon is a little too heavy on the parsing stuff.

I'm a big fan of Appel's Modern Compiler Implementation in ML. The first half of the book dabbles in everything just enough to implement it, and is the perfect length for a course. Then the second half has all sorts of stuff for the curious.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Subjunctive posted:

i don't actually think there's anything especially magic about a compiler that validates a language. AOT compilers typically don't need to worry much about resource management, performance, parallelism, sophisticated error handling, or security, and they tend to be maintained by experts. why not make the threshold be a garbage-collecting runtime, a web browser, an X server, or a an editor?

As a compiler dev, I pretty much agree with this. The problem is, we've gotten so good at compilers that it's no longer a complex program. well, at least in the sense that it doesn't really exercise the language much.

I could write-- er, wait. have written a language that's awesome for writing compilers, but absolute rear end for everything else. Hell, I know of several such languages, come to think of it.

But I do still think writing a compiler works as a litmus test, if not as validation. And it's traditional. :)

crazypenguin
Mar 9, 2005
nothing witty here, move along

AlsoD posted:

Serious question: where does a library/API stop and an embedded DSL begin?

There isn't a precise definition. It's a human thing, not really a technical one.

Generally speaking, if you use virtualized syntax and abuse operators in a way that would get you accused of terrible library design and bad programming, you defend it by calling it an EDSL instead of a library.

I might be biased against edsls though. The best of them can at least defend themselves by claiming their abuse of poo poo is worth it, and is sensible as long as you take the time to learn their system. Which has the benefit of being true on very rare occasions.

The problem is everybody thinks their library is the most special thing in the universe and deserves to break the rules, and they're almost all wrong.

crazypenguin
Mar 9, 2005
nothing witty here, move along
macros are terrible, and not having macros is one of the best things about c#/java

locking macros behind a compiler flag in rust is the next best thing they could do after ripping the whole thing out. I still think they should do the latter.

crazypenguin
Mar 9, 2005
nothing witty here, move along

rjmccall posted:

there are two basic type-checking strategies in the world: bottom-up, where you analyze sub-expressions independently of each other, and constraint-based, where you look at an entire expression simultaneously

I'd say bi-directional type checking is another general strategy. On the other hand, I thought Scala was based on bidirectional type checking, and you keep talking about how Scala's a horrible hack. Have they strayed from the original elegance, or do you really not like this approach for some reason?

tef posted:

ps don't most HM systems do type reconstruction a bit, anyway?

I'd guess all do. HM isn't exactly special for any reason other than it hits a sweet spot for doing type inference. Or at least, any reason that I'm aware of.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Notorious b.s.d. posted:

you really, really want to be using cfg mgmt + groovy scripts to manage your jenkins.

is there a particularly nice way to use groovy to generate jenkins jobs or something?

i have a python script i wrote up to generate all our jobs. but i wrote it all by hand to build xml strings and poo poo. not too bad, but not great either. but I couldn't find any non-poo poo jenkins api client library anywhere so...

crazypenguin
Mar 9, 2005
nothing witty here, move along
Well, a quick google suggests there's only a chef thing for installing a job config.xml, not anything for generating them?

If that's the case, then good, I'm not really missing something better. Or bad, nothing better exists. Eh, both.

crazypenguin
Mar 9, 2005
nothing witty here, move along

Cybernetic Vermin posted:

static typing in prolog would make very little sense. it is not really clear what it would even mean.

gonadic io posted:

there are statically typed logic programming languages

lambda prolog, for example.

edit: misread "there are" as "are there". fixed

crazypenguin fucked around with this message at 23:20 on Mar 6, 2015

crazypenguin
Mar 9, 2005
nothing witty here, move along

Cybernetic Vermin posted:

mostly what i find difficult about it is that all of prolog restricts objects to some domain prescribed by a sequence of predicates, and drawing the line between what predicates are "types" seems artificial

while numbers and lists have a sort of special status at the very least all kids of user-defined types are fundamentally a matter of logical constraints which are by their nature, and design, indistinguishable from what constitutes computation

Basically, it allows you to draw a distinction between data and relations. So: (and my lambda prolog is rusty so forgive my syntax errors)

code:
expr : ty.
abs : (expr -> expr) -> expr.
app : expr -> expr -> expr.
tt : expr.
ff : expr.
cond : expr -> expr -> expr -> expr.

eval : expr -> expr -> o.

eval (app (abs f) x) (f x).
eval (cond X T F) T :- eval X tt.
eval (cond X T F) F :- eval X ff.
So, reading down this bit of code, "expr is a type", "abs, app, tt, ff, cond are constructors of this expr type", "eval is a binary relation on expr" (the o type is basically the type of propositions), then there's the normal prology evaluation rules for this tiny little lambda calculus.

clear anything up, or do I just muddle things further?

crazypenguin
Mar 9, 2005
nothing witty here, move along

pointsofdata posted:

if ++ didn;t already exist and someone suggested it we'd all be mocking them mercilessly

idk, I might endorse the idea as a statement, but not as an expression.

i kind also feel the same way about = and its friends.

crazypenguin
Mar 9, 2005
nothing witty here, move along

comedyblissoption posted:

i'm trying to think of another justifiable reason besides mocking and i literally can't come up with another reason

frameworks, probably.

like, i dunno how to define a "framework" as a distinct thing from an ordinary library except as a "pre-existing structure of interfaces and different modules implementing these interfaces that are composed via some form of DI so you can hook into it and customize whatever."

ok so i googled framework, and yeah, I like my definition better than wikipedia's.

crazypenguin
Mar 9, 2005
nothing witty here, move along
if you really want to do parallel parsing there's a good formalism for that:

Parallel Parsing of Operator Precedence Grammars

quote:

Operator precedence grammars, introduced by Floyd several decades ago, enjoy properties that make them very attractive... In this paper we focus on their local parsability property, i.e, the fact that any substring s of a longer one x:s:y can be parsed independently of its context without the risk of invalidating the partial parsing when analyzing another portion of the whole string. We exploit this distinguishing property by developing parallel algorithms...

but if it's just log files, you're probably better off just dropping the threads evenly distributed and finding the next newline character

crazypenguin
Mar 9, 2005
nothing witty here, move along
i saw a talk about kubernetes recently, and it looks really cool so i wanted to learn more about it

but it seems to use docker and etcd and all i hear is how these things are broken and now i dunno

or maybe just everything is broken?

crazypenguin
Mar 9, 2005
nothing witty here, move along

Suspicious Dish posted:

You can't easily transcode a video as a MapReduce job -- there's an inherent process in there that just takes a long-rear end time, and isn't easily parallelizable.

the input to the job would just be a list of file names or urls to each video. each map job would just do the transcoding of the videos it's handed. no real reduce phase but that's just fine.

i think you're maybe thinking of trying to do one video as a mapreduce job? that's not right. it's the aggregate.

or am i misunderstanding you

crazypenguin
Mar 9, 2005
nothing witty here, move along
i still worship at the alter of the LR gods

...admittedly parser generators pretty much universally suck though.

I could fix that, but I don't know who'd pay me to do it so :effort:

Adbot
ADBOT LOVES YOU

crazypenguin
Mar 9, 2005
nothing witty here, move along

MononcQc posted:

lack of powerful macros (I like them in personal projects, but not team work)

I don't even like them in personal projects. Macros are the worst decision language designers can make.

It's also the single biggest thing I'm disappointed with Rust about.

As far as I can tell, people get enamored with the idea that a program is just a data structure and you can manipulate it! (Which, granted, is loving awesome and why I went into pl/compilers.) But then they turn off their brains when it comes to all the downsides to macros. It's not just teams that make macros bad, it's also the way they destroy all your helpful tools and generally just make everything complicated for no gain. (Really no gain, because you can do everything people use macros for better in some other way.)

quote:

I'd rather live in a world full of ex-rubyist elixirites than one full of golang nuts.

idk. Go strikes me as a language designed by people with some stupid opinions, but actually manages to serve a niche and is used by plenty of reasonable people. I've seen people build reasonably good projects with Go, despite its shortcomings.

I'd take that over the usual rubyist stereotype any day.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply