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
ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
the best mgmt is the ones that don't want to be there
beware the ones that love meetings

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Brain Candy posted:

oh, i totally like stories too. but when duder admitted he got sucked into mgmt the hints of a wounded ego suddenly made more sense

e: on second thought, just: lol

Subjunctive fucked around with this message at 23:03 on Mar 5, 2015

Tavistock
Oct 30, 2010



tef i want to learn logic programming but i don't even know what the gently caress it is about. with python and junk i just sort of said i want to do a thing and kept learning what to do until i got it done. you seem like someone that is good a pedagogy and you use prolog, so what are some approachable problems to solve with logic programming.

im using clojure core.logic and i looked at a sudoku solver after reading a chapter on prolog in some book at my library and it doesnt even make sense. it seems like its time scheduler: the language. i think i want to write static analysis tools for my lovely programs or something. help

tef
May 30, 2004

-> some l-system crap ->

prefect posted:

he might have been serious :shrug:

i was :3:

tef
May 30, 2004

-> some l-system crap ->
for serious, knowing your own limits, and being able to take the immediate problem for the larger issue at hand, well, it's a hard choice, so uh yeah

HELP I WAS BEING NICE

tef
May 30, 2004

-> some l-system crap ->
HOW DO I SAY NICE THINGS I HAVE FORGOTTEN

JawnV6
Jul 4, 2004

So hot ...

tef posted:

HOW DO I SAY NICE THINGS I HAVE FORGOTTEN

tef
May 30, 2004

-> some l-system crap ->
ten years being an rear end in a top hat, ama

leftist heap
Feb 28, 2013

Fun Shoe
are there web frameworks for prolog. is there an equivalent to monad tutorials for prolog?

PleasureKevin
Jan 2, 2011



oracle now forcing installation of ask jeeves adware on install of Java runtime

crazysim
May 23, 2004
I AM SOOOOO GAY

PleasureKevin posted:



oracle now forcing installation of ask jeeves adware on install of Java runtime

by what non Chrome Web Store method does this adware install itself with? i thought they blocked that.

Hed
Mar 31, 2004

Fun Shoe
you down with JRE?
yeah you Ask Jeeves

MrMoo
Sep 14, 2000

crazysim posted:

by what non Chrome Web Store method does this adware install itself with? i thought they blocked that.

Doesn't Chrome deactivate drive-by extension and app installs by default?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

you can't opt out any more?

Phone
Jul 30, 2005

親子丼をほしい。
i guess oracle is mad about adobe stealing the limelight lately with flash 16 being a colossal piece of poo poo

crazysim
May 23, 2004
I AM SOOOOO GAY

MrMoo posted:

Doesn't Chrome deactivate drive-by extension and app installs by default?

That's what I thought. Was it Windows only?

As for getting around, I thought that's Beta, Developer, and Canary. Stable blocked.

MeruFM
Jul 27, 2010
it's only blocked on windows
and beta also blocks

And developer/canary crashes every 3rd page

tef
May 30, 2004

-> some l-system crap ->

Tavistock posted:

tef i want to learn logic programming but i don't even know what the gently caress it is about. with python and junk i just sort of said i want to do a thing and kept learning what to do until i got it done. you seem like someone that is good a pedagogy and you use prolog, so what are some approachable problems to solve with logic programming.

eh

it's weird to want to know something because you don't know what it is you'll learn, but eh, prolog's just plain weird. it's somewhere between writing sql queries in regular expressions and executable grammar.

it was my first weird language and it stuck with me, the aha moments where you understand what the gently caress you are doing are rather nice, and there is this notion of finding a very declarative essence of what makes a program. indeed, many prolog programs can be run backwards as well as forwards.

quote:

im using clojure core.logic and i looked at a sudoku solver after reading a chapter on prolog in some book at my library and it doesnt even make sense. it seems like its time scheduler: the language. i think i want to write static analysis tools for my lovely programs or something. help

tbh "the reasoned schemer" or something around kanren/minikanren might be good


rrrrrrrrrrrt posted:

are there web frameworks for prolog. is there an equivalent to monad tutorials for prolog?

yes. and not really

as for other bits, well in prolog you tend to write meta-interpreters a lot so uh :2bong:

tef
May 30, 2004

-> some l-system crap ->
prolog in a nutshell.

1. prolog is a database.

code:
foo.
bar.
butt.
we can load this and ask

?- foo. and it is true, yes, foo exists
?- poop. it is false, so no poop does not exist.

and we can build up queries

? - foo, butt. % is foo and butt true

2. prolog is a query language

code:
butts :- a_butt, another_butt
we can define facts in the database, like foo, bar, and baz in terms of other facts, kinda like stored queries, or computed values
we can say either AND or OR, so foo :- a; b is foo if a OR b, and foo :- a,b is a AND B.


3. prolog is a grammar

code:
expression :- number;
expression :- bracket, expression_list, bracket
prolog works top down, left to right, recursing as it goes to work out what facts are in the database, we can specify multiple rules
and they are tried in order.

we can actually get multiple results for queries too.

4. prolog is a programming language

we can add in parameters to queries and facts in the database

member(X, List) :- head(List, X).
member(X, List) :- tail(List, T), member(X, T)

this says: X is a member of a List, if it is at the front of a list, or member of the tail of the list

:2bong:

Athas
Aug 6, 2007

fuck that joker

tef posted:

4. prolog is a programming language

we can add in parameters to queries and facts in the database

member(X, List) :- head(List, X).
member(X, List) :- tail(List, T), member(X, T)

this says: X is a member of a List, if it is at the front of a list, or member of the tail of the list

:2bong:

5. Prolog is an imperative programming language.

You add a built-in predicate that succeeds while performing a side effect.

printButts([butt | Butts ]) :- !, print('found butt'), printList(Butts).
printButts([ _ | Butts ]) :- printButts(Butts)

"Practical" Prolog can be some really nasty poo poo. No idea why anyone would take something so beautiful and make it so nasty.

Athas
Aug 6, 2007

fuck that joker
Basically, if you want to learn Prolog, actually learn Datalog.

sarehu
Apr 20, 2007

(call/cc call/cc)
Prolog sucks because it is dynamically typed, it's practically Javascript only with easier to understand evaluation order.

Workaday Wizard
Oct 23, 2009

by Pragmatica

sarehu posted:

Prolog sucks because it is dynamically typed, it's practically Javascript only with easier to understand evaluation order.

i havent used prolog but aren't head() and tail() algebraic types in this example? if you want to use a head() you have to have head() in your function (does prolog have functions?)
member(X, List) :- head(List, X).
member(X, List) :- tail(List, T), member(X, T)

Athas
Aug 6, 2007

fuck that joker

Shinku ABOOKEN posted:

i havent used prolog but aren't head() and tail() algebraic types in this example? if you want to use a head() you have to have head() in your function (does prolog have functions?)
member(X, List) :- head(List, X).
member(X, List) :- tail(List, T), member(X, T)

Prolog does not have functions, only predicates. 'head(List, X)' means to see if you can take the head of List and unify it with X, which is done by checking all the rules for 'head'. There is probably only one such rule, and it looks like this:

head([X | _], X).

MononcQc
May 29, 2007

Athas posted:

Basically, if you want to learn Prolog, actually learn Datalog.

Mercury

Cybernetic Vermin
Apr 18, 2005

sarehu posted:

Prolog sucks because it is dynamically typed, it's practically Javascript only with easier to understand evaluation order.

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

gonadic io
Feb 16, 2011

>>=
there are statically typed logic programming languages (or at least logic DSLs embedded in languages with such type systems)

sarehu
Apr 20, 2007

(call/cc call/cc)
What's the deal with complex numbers as a built-in feature?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

sarehu posted:

What's the deal with complex numbers as a built-in feature?

it's tricky to get the exact semantics right if they aren't built-in because just promoting the values to complex can do the wrong thing with infinities and negative zero

Cybernetic Vermin
Apr 18, 2005

gonadic io posted:

there are statically typed logic programming languages (or at least logic DSLs embedded in languages with such type systems)

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

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

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
i took classes from sergio antoy

it is completely batshit

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?

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
help I can't stop using x-macros

I'm now using them to generate sql statements

they're so convenient but how ugly

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
how can't there be a more c++ way in tyool 2015

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
like, a compile-time ast api

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
where are your stored / parametrized queries???

Dicky B
Mar 23, 2004

hackbunny posted:

like, a compile-time ast api
sounds easy i'll email the standards committee and maybe they'll consider it for c++35

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

hackbunny posted:

like, a compile-time ast api

use a lisp :unsmigghh:

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

hackbunny posted:

like, a compile-time ast api

what's this about gcc pulling ahead of llvm recently?

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