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.
 
  • Locked thread
Soricidus
Oct 21, 2010
freedom-hating statist shill
"best javascript package manager" is in the same class as "most trustworthy bitcoin exchange" or "funniest post by me"

there's probably a word for it

Adbot
ADBOT LOVES YOU

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

lesser of two evils?

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



bower was kind of a weird thing since npm was already around and they worked so similarly. like you have an npm for back-end stuff and an npm for front-end stuff, why not just have npm?

also css is a lot better if you don't have to target <ie9 and even better if you can do flexbox, and then even better if you can do the new gridbox. a lot of the problems with doing web development even a year or two ago was that you had to keep developing to support the complete garbage fire that is ie6/8/9 instead of the semi-garbage fire that is chrome/firefox/edge

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

ms is hard at work closing the strategic dorkster gap:

http://dotnetfringe.org/

akadajet
Sep 14, 2003

NihilCredo posted:

ms is hard at work closing the strategic dorkster gap:

http://dotnetfringe.org/



:wow:

Bloody
Mar 3, 2013

i think i might be too stupid for haskell

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Bloody posted:

i think i might be too stupid for haskell

I know I am.

Bloody
Mar 3, 2013

i made a program that takes input and turns it into numbers and adds the numbers and compiles into an executable omg

this is the most i have done with haskell ever

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

nobody is too stupid for haskell. its pretty easy unless you try to dive into the weird esoteric research stuff. its just weird at first

Bloody
Mar 3, 2013

idk i just wanna make a parser thing

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Condiv posted:

null? not Optional<T>? shame on you

dont use optional<t> in constructor. really you should only use optional<t> when it's the return value.

your constructor should handle null values.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
gently caress i just outed myself as a java dev

netcat
Apr 29, 2008

Bloody posted:

idk i just wanna make a parser thing

you're in luck, Parsec is very easy and fun to use, even I with my tiny brain could write a parser for a toy language

Bloody
Mar 3, 2013

holy poo poo i parsed a line

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Bloody posted:

holy poo poo i parsed a line

:toot:

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
ragel is cool too if you want to sperg out on parsing weird protocols.

i used it to generate efficient C code to parse terminal escape chars to capture mouse movement in a terminal.

dont ask what for, its for a project.

Bloody
Mar 3, 2013

unfortunately my parsed line is inside an either and i don't remember how to do poo poo with an either

Bloody
Mar 3, 2013

its either an error or a statement and i just wanna know which, yknow?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

use monads

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i liked it when elm renamed either to result with ok, err tags instead of left, right tags. i can never remember if left is supposed to be the good one or the bad one

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
has any multi value return function returned an error on the left side?

gonadic io
Feb 16, 2011

>>=

Bloody posted:

its either an error or a statement and i just wanna know which, yknow?

Pattern match on it with case. It's constructors are Left and Right. (Right is valid, Left is error by convention).

Feel free to error on a Left if you dgaf

gonadic io
Feb 16, 2011

>>=

CRIP EATIN BREAD posted:

has any multi value return function returned an error on the left side?

Haskell eithers do, see my previous comment.

Shaggar
Apr 26, 2006

CRIP EATIN BREAD posted:

gently caress i just outed myself as a java dev

java is good. not as good as c#, but java has maven which is the best ever

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Shaggar posted:

java is good. not as good as c#, but java has maven which is the best ever

remember when maven central didnt do ssl unless you paid, and someone wrote that cool proxy server that injected a picture into every package you downloaded from maven central

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

CRIP EATIN BREAD posted:

remember when maven central didnt do ssl unless you paid, and someone wrote that cool proxy server that injected a picture into every package you downloaded from maven central

link pls

Shaggar
Apr 26, 2006

CRIP EATIN BREAD posted:

remember when maven central didnt do ssl unless you paid, and someone wrote that cool proxy server that injected a picture into every package you downloaded from maven central

I hadn't heard of that but you would have had to switch to the proxy server to use it, wouldn't you? or was it just a poc?

homercles
Feb 14, 2010

I'm on a diet and can't eat burritos

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat


Shaggar posted:

I hadn't heard of that but you would have had to switch to the proxy server to use it, wouldn't you? or was it just a poc?

http://blog.ontoillogical.com/blog/2014/07/28/how-to-take-over-any-java-developer/

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?

Bloody posted:

idk i just wanna make a parser thing

are you making a hardware parser?

how's things with CλaSH?

JawnV6
Jul 4, 2004

So hot ...
clash makes sense for datapath, but how do you model something like an icache? seems pretty stateful imho

Bloody
Mar 3, 2013

eschaton posted:

are you making a hardware parser?

how's things with CλaSH?

im makin a simple verilog linter thingy

clash is currently in the "uh wtf is any of this" state for me

Bloody
Mar 3, 2013

gonadic io posted:

Pattern match on it with case. It's constructors are Left and Right. (Right is valid, Left is error by convention).

Feel free to error on a Left if you dgaf

yeah

how do i do this from the interactive prompt

i just wanna poke the output

gonadic io
Feb 16, 2011

>>=

Bloody posted:

yeah

how do i do this from the interactive prompt

i just wanna poke the output
The easiest way is probably
Call isLeft / isRight to see which one you've got

Then "let (Left x) = val" to pull it out. Now x is bound to the inner thing

I'm actually a bit surprised that either doesn't have a function like fromJust but whatever.

Bloody
Mar 3, 2013

oh im dumb and was misusing megaparsec

HoboMan
Nov 4, 2010

So if you put just a function name or variable name in an if statement in javascript
e.g.
JavaScript code:
if (buttFunc)
this is a test for existence? also can I just negate this if I want a thing to happen if it don't exist?

e: the code i'm looking at seems to assume this is the case, but it's a broken mess so i want to double-check

HoboMan fucked around with this message at 20:51 on Apr 4, 2016

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



HoboMan posted:

So if you put just a function name or variable name in an if statement in javascript
e.g.
JavaScript code:
if (buttFunc)
this is a test for existence? also can I just negate this if I want to thing to happen if it don't exist?

Yes

It's just testing truthiness/falsiness on whatever variable you have in there. Null and undefined are false, objects and arrays (even if empty) are true, etc. Be careful with 0 and empty strings since those probably false

Bloody
Mar 3, 2013

verilog is icky poop

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i never did anything with verilog, just VHDL, and that was p. cool.

that was a decade ago, tho.

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

gently caress, I got this button that pops up a dialog that stops working if i change something unrelated in the html. what the hell?

  • Locked thread