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
Nomnom Cookie
Aug 30, 2009



tef posted:

i mean, i could give up on having negative lookahead and ordered choice, yes, but i've decided that returning shift/reduce errors isn't an improvement

especially because i'm also parsing markup languages

does trying to snow people by throwing around jargon often work for you? did I say some words that sounded like “I think you should have gone with LALR” to you?

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

Nomnom Cookie posted:

the real answer is it sounds to me like you’ve boxed yourself in by choosing peg too early. first figure out what set of accepted grammars has the right ergonomics then make a judgment on how you’re going to handle them. imo

that's kinda what i'm doing: i have pegs + left recursive features, and i'm trying to make this judgement

Nomnom Cookie posted:

does trying to snow people by throwing around jargon often work for you? did I say some words that sounded like “I think you should have gone with LALR” to you?

like, "you chose peg too early" ~> "you chose top down methods too early, if left recursion is a problem you want to solve"

"figure out the right set & handle them" ~> "left recursion generally means handling things bottom up in some form or another, which inevitably means building some sort of LR like automaton to handle the nondeterminism"

i did assume you weren't suggesting any of the methods i'd already outlined to bolt things onto the peg engine, like cancellation parsing or precedence climbing, you were suggesting i go back and find a "one size fits all approach", but really, unless you were about to spring an earley parser on me, you were going to suggest some form of LR parsing

i mean, sure, maybe you're a big fan of demer's generalised left corner parser but i figured if that was the case you'd have been infodumping and not shitposting


Nomnom Cookie posted:

pop up a message box that says here’s a lookahead kid go get yourself a real grammar

but mostly this set the vibe, hth

Nomnom Cookie
Aug 30, 2009



tef posted:

that's kinda what i'm doing: i have pegs + left recursive features, and i'm trying to make this judgement

like, "you chose peg too early" ~> "you chose top down methods too early, if left recursion is a problem you want to solve"

"figure out the right set & handle them" ~> "left recursion generally means handling things bottom up in some form or another, which inevitably means building some sort of LR like automaton to handle the nondeterminism"

i did assume you weren't suggesting any of the methods i'd already outlined to bolt things onto the peg engine, like cancellation parsing or precedence climbing, you were suggesting i go back and find a "one size fits all approach", but really, unless you were about to spring an earley parser on me, you were going to suggest some form of LR parsing

i mean, sure, maybe you're a big fan of demer's generalised left corner parser but i figured if that was the case you'd have been infodumping and not shitposting

but mostly this set the vibe, hth

no I was saying you need to decide what would be a good interface to present to users and have that drive implementation. writing grammars is really loving hard so a tool that consumes grammars isn’t going to be worth a poo poo without obsessive focus on what grammars users will write and how to make success as easy as possible. what algorithm you end up using is entirely contingent

I do like earley parsers because that lets you decouple the capabilities of the parser from the grammars you accept and focus purely on creating useful restrictions rather than working around the limitations of your parser. but that is not really relevant here

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

tef posted:

i have this parsing evaluation grammar, i want to extend it with means of defining stuff like infix operators. like `e := e "+" e`, and i'm mulling over the various ways of trying to make it work

1. don't do it, and just force users to write right recursive grammars

just use prefix S-expressions

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

tef posted:

especially because i'm also parsing markup languages

well there’s your real problem

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

eschaton posted:

just use prefix S-expressions

(now (have you (problems two)))

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Visions of Valerie posted:

(now (have you (problems two)))

lmao

VikingofRock
Aug 24, 2008




Presto posted:

inline static const std::unordered_map<const unsigned long long* const, const unsigned long long* const>* const butts = nullptr;

You can use a std::tuple if you want to keep going. But using the STL might be cheating.

Is it weird that the craziest part of this to me was that you were using a pointer as a map key?

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Visions of Valerie posted:

(now (have you (problems two)))

thread title

mystes
May 31, 2006

Visions of Valerie posted:

(now (have you (problems two)))

mr Scoop
Feb 13, 2006

Help! Someone! Cut my head off, it's trying to murder the rest of me!


Grimey Drawer

Visions of Valerie posted:

(now (have you (problems two)))

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

Presto posted:

inline static const std::unordered_map<const unsigned long long* const, const unsigned long long* const>* const butts = nullptr;

You can use a std::tuple if you want to keep going. But using the STL might be cheating.

think they are referring to this https://en.cppreference.com/w/cpp/language/value_category

quote:

a glvalue (“generalized” lvalue) is an expression whose evaluation determines the identity of an object or function;
a prvalue (“pure” rvalue) is an expression whose evaluation

computes the value of an operand of a built-in operator (such prvalue has no result object), or
initializes an object (such prvalue is said to have a result object).

The result object may be a variable, an object created by new-expression, a temporary created by temporary materialization, or a member thereof. Note that non-void discarded expressions have a result object (the materialized temporary). Also, every class and array prvalue has a result object except when it is the operand of decltype;

an xvalue (an “eXpiring” value) is a glvalue that denotes an object whose resources can be reused;
an lvalue (so-called, historically, because lvalues could appear on the left-hand side of an assignment expression) is a glvalue that is not an xvalue;
an rvalue (so-called, historically, because rvalues could appear on the right-hand side of an assignment expression) is a prvalue or an xvalue.

and it keeps changing...

FlapYoJacks
Feb 12, 2009

Phobeste posted:

thread title

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Sweeper posted:

think they are referring to this https://en.cppreference.com/w/cpp/language/value_category

and it keeps changing...

i read that quote and the only thing i can think of is "did you just tell me to go gently caress myself?"

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
https://i.imgur.com/3wlxtI0.gifv still cracks me up

Zlodo
Nov 25, 2006

and you still end up with bugs caused by something uninitialized somewhere

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

Zlodo posted:

and you still end up with bugs caused by something uninitialized somewhere

thats just another form of initialization

Tunicate
May 15, 2012

Zlodo posted:

and you still end up with bugs caused by something uninitialized somewhere

shrimp are the bugs of the sea

Cybernetic Vermin
Apr 18, 2005

the main reason to hate c++ is that probably some of the finest pl pedants of our generation are tied up in defining all the irrelevant poo poo going on in it.

Bloody
Mar 3, 2013

that sounds like a good thing tho it’s a containment zone

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
c++ language efforts compared to “digging holes, then filling them in again so PL researchers / developers don’t go and invent yet more languages”?

bjarne stroustrup 🫡

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Cybernetic Vermin posted:

the main reason to hate c++ is that probably some of the finest pl pedants of our generation are tied up in defining all the irrelevant poo poo going on in it.
speaking of which, did they merge that entire proposed 2d rendering library into the standard library yet

iirc the reason for inclusion was "it would really improve C++ adoption among students" which is clearly the thing the STL should be focusing on

repiv
Aug 13, 2009

no that proposal was obsoleted by the other proposal to put an entire web browser in the standard library

Xarn
Jun 26, 2015
To be fair (lol), there is no mechanism to force someone to stop submitting a paper. As long as someone wants to, they can keep sending in the 2d graphics paper.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
was the problem that the committee was being kind and not telling the person "lol. lmao. no." amd instead giving constructive feedback on a proposal that would never accept?

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

repiv posted:

no that proposal was obsoleted by the other proposal to put an entire web browser in the standard library
ah right, i guess everyone agreed the scope of a full 2d graphics library was a bit too narrow

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
the problem was that it was herb sutter's idea and you can't just go "lol no" to the chairman of the committee

Cybernetic Vermin
Apr 18, 2005

just put tk into every language spec imo

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
every graphical operating system has apis for opening a window, flipping a texture to that window, and obtaining keyboard and pointer events

smoothing out the differences between these apis to achieve a portable and reasonably performant common denominator is a gigantic pain in the rear end. multiple very complicated open source libraries exist to achieve this goal, with varying amounts of additional bells and whistles: SDL, raylib, allegro, etc

it would be nice if the creators of more languages and language ecosystems considered being able to do that sort of poo poo out of the box essential, rather than some kind of esoteric distraction from the real language approach of offering stdio and leaving users to write their own bindings to C libraries if they need anything else

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
precisely because platform apis are so different, a portable library over them is a recipe for a lovely experience both for programmers and users. inevitably you end up less wrapping the platform frameworks and more implementing your own quixotic least-common-denominator framework that unsurprisingly ends up looking and feeling totally different from the normal platform

repiv
Aug 13, 2009

microsoft is deftly solving that problem by having so many disparate UI frameworks that nobody can even tell what's supposed to be the native look and feel anymore

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I am emphatically not talking about a "UI framework"; i'm talking about a minimum-viable IO layer like SDL, Raylib, and Allegro, which have been a perfectly acceptable "experience" for building hundreds of thousands of games and applications

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
but then why not fix the underlying issue of it being a major pain in the dick to be able to use external libraries (and in a way that compiler implementors actually can build, so maybe not like modules)

i mean, having something like sdl in the stl would mean that every new os or wm feature would take six years to land in major compilers. sure, it'd be standardised but you can also "standardise" simply by using sdl

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Internet Janitor posted:

every graphical operating system has apis for opening a window, flipping a texture to that window, and obtaining keyboard and pointer events

smoothing out the differences between these apis to achieve a portable and reasonably performant common denominator is a gigantic pain in the rear end. multiple very complicated open source libraries exist to achieve this goal, with varying amounts of additional bells and whistles: SDL, raylib, allegro, etc

it would be nice if the creators of more languages and language ecosystems considered being able to do that sort of poo poo out of the box essential, rather than some kind of esoteric distraction from the real language approach of offering stdio and leaving users to write their own bindings to C libraries if they need anything else

except that it sucks when they build in a cross-plat interface, like Java did. poo poo looks like rear end

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
awt and swing look dated and non-native, and are kind of a pain in the rear end to use, but they're functional. with a little effort you can get results comparable in many ways to Qt, but unlike Qt you don't have to run all your code through an insane custom preprocessor

java2d, the graphics foundation that underlies awt, is much closer to what i'm advocating. it provides performant (hardware accelerated where available) and perfectly cross-platform basic canvas-style drawing capabilities

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
the big issue is if you start saying "i want this code to look like it's using native os widgets with native styling", while simultaneously saying "i want it to look the same on every platform", which are two goals that are literally impossible to achieve simultaneously

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
at no point have i remotely implied i want to be able to make anything look like it's using native widgets with native styling

Cybernetic Vermin
Apr 18, 2005

i give very few shits about things looking native, as nothing does anyway. i do otoh think that just providing some drawing primitives will inspire some bad decisions about internationalization and accessibility.

tbh in 2024 it is simply the reality that the way to do a ui in a sensible way is some kind of webview.

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

p-js: just added a non-trivial unit test to my project and had to add this to my __init__.py:

Python code:
sys.setrecursionlimit(1000000)  # booyah
wouldn't have to do this if I was writing this in Lean :toughguy:

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

I see the appeal of just not doing native ui but whenever I have to use some text edit control that implements yet another completely different, wildly insufficient subset of the behaviors that every Windows text box since '95 supported, it does make me feel like a high level widget toolkit ought not only to ship with the programming language but actually be mandatory to use unless you have a waiver from one of those old times HIG experts

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