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
Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




:// go backup, its ya data //:

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

cinci zoo sniper posted:

pandas feels fairly awkward after r

I feel like this was pretty much the main motivation for julia

cinci zoo sniper
Mar 15, 2013




Symbolic Butt posted:

I feel like this was pretty much the main motivation for julia

as awkward as i find pandas, its a better solution than a new language

cinci zoo sniper
Mar 15, 2013




most importantly, i have barely spent time with pandas so i imagine my opinion will change 10 times by the time im done with this project (until xmas)

simble
May 11, 2004

https://twitter.com/thomasfuchs/status/928808041587314689

tinaun
Jun 9, 2011

                  tell me...
ugh there seems to be no music player with a decent extension api.

basically all I want is to get the metadata when a new song starts playing, but everything seems like clunky undocumented garbage

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news
there's people who write status bar plugins for spotify + itunes on mac and they're on github so maybe you could start there idk

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



tinaun posted:

ugh there seems to be no music player with a decent extension api.

basically all I want is to get the metadata when a new song starts playing, but everything seems like clunky undocumented garbage

https://mod.haxor.fi/Moby/mod.mobyle

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

tinaun posted:

ugh there seems to be no music player with a decent extension api.

basically all I want is to get the metadata when a new song starts playing, but everything seems like clunky undocumented garbage

it really whips the llamas rear end

Elias_Maluco
Aug 23, 2007
I need to sleep

tinaun posted:

ugh there seems to be no music player with a decent extension api.

basically all I want is to get the metadata when a new song starts playing, but everything seems like clunky undocumented garbage

try foobar

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



$a = DotNetCommandRun("mplayer.exe", $whatever);

$b = $a.GetMetaData();

tinaun
Jun 9, 2011

                  tell me...

that’s what I wanted to do at first but the included demo project managed to give me errors in loving Windows.h


I’m probably doing something stupid

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Windows/Foobar.h

gonadic io
Feb 16, 2011

>>=
terrible hobby programmer status:

Workaday Wizard
Oct 23, 2009

by Pragmatica

gonadic io posted:

terrible hobby programmer status:


nice!

are you making a solver for the zachtronics alchemy game?

gonadic io
Feb 16, 2011

>>=

Shinku ABOOKEN posted:

nice!

are you making a solver for the zachtronics alchemy game?

i'm just implementing it at first, but i might make a solver eventually. the main thing i want is an undo button.

gonadic io
Feb 16, 2011

>>=
p.s. source code: https://github.com/djmcgill/garden-opus

current screenshot:

Corla Plankun
May 8, 2007

improve the lives of everyone
im excited to see how it pans out

it seems like maybe every game of the garden is winnable? but i dont have agood heuristic for how to use salts yet

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic io posted:

p.s. source code: https://github.com/djmcgill/garden-opus

current screenshot:


fuuuuck that square is spinning so fast

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Corla Plankun posted:

im excited to see how it pans out

it seems like maybe every game of the garden is winnable? but i dont have agood heuristic for how to use salts yet

Assuming random placement, there are unwinnable games. Consider a game with metal-lead-metal placed in a line; you can't remove either of the metals on the ends without first removing lead, but you can't get free space for the lead with both the metals there.

If the game has smarter-than-random placement rules to try to avoid this situation, then at the very least they're buggy; I've had a game generated where no first move was possible.

Mao Zedong Thot
Oct 16, 2008


tinaun posted:

ugh there seems to be no music player with a decent extension api.

basically all I want is to get the metadata when a new song starts playing, but everything seems like clunky undocumented garbage

quod libet has easy extension api

despite name its the best music player

Corla Plankun
May 8, 2007

improve the lives of everyone

ShoulderDaemon posted:

i've had a game generated where no first move was possible.

oh!

i haven't ever seen one with no first move (theres always at least salt+element) so i assumed the placing was very clever

akadajet
Sep 14, 2003

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Corla Plankun posted:

oh!

i haven't ever seen one with no first move (theres always at least salt+element) so i assumed the placing was very clever

i think it's possible to make placement rules where every game is winnable, but i think the actual game just happens to be fairly easy but not actually guaranteed-winnable. the lack of undo kind of hides this; it's very good at making you feel like if you lose a game it's probably your fault

Ator
Oct 1, 2005

trying out .net core this weekend

so i guess you just use VS Code to make these C# .net core projects? but the ide cant make the csproj file used to compile a bunch of .cs files. so you have to make and edit the csproj manually. or use an ide extension with a few thousand downloads that will add a context menu option to add/remove files to the csproj.

so i did that. and it works. not too bad i guess.

now i have a simple command line program that successfully opens a database connection. :slick: and it works on both windows and linux. i might replace a lot of my python scripts with C# now...

for some reason my executable is actually a dll though (lol?)

also the linux build produces .dll files too :wtf:

SpaceAceJase
Nov 8, 2008

and you
have proved
to be...

a real shitty poster,
and a real james

cinci zoo sniper
Mar 15, 2013





so why is the sender of this bullshit censored?

CPColin
Sep 9, 2003

Big ol' smile.
Owner: Becky with the Bad Legal Advice

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

cinci zoo sniper posted:

so why is the sender of this bullshit censored?

VikingofRock
Aug 24, 2008





Send them an invoice for the time spent reading their stupid extortion letter

OldAlias
Nov 2, 2013

fake

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
I can see why they only pay the owner $100 an hour if she wastes her time on policies like shaking down applicants that didn't work out.

Gul Banana
Nov 28, 2003

Ator posted:

trying out .net core this weekend

so i guess you just use VS Code to make these C# .net core projects? but the ide cant make the csproj file used to compile a bunch of .cs files. so you have to make and edit the csproj manually. or use an ide extension with a few thousand downloads that will add a context menu option to add/remove files to the csproj.

so i did that. and it works. not too bad i guess.

now i have a simple command line program that successfully opens a database connection. :slick: and it works on both windows and linux. i might replace a lot of my python scripts with C# now...

for some reason my executable is actually a dll though (lol?)

also the linux build produces .dll files too :wtf:

you’re meant to use the cli to do stuff like project creation. “dotnet new -t console” should make a reasonable csproj

Gul Banana
Nov 28, 2003

once you’ve built your thing, “dotnet publish” will create a distributable version which you run with just “dotnet <name of dll>”. it’s like java basically

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

Ator posted:

trying out .net core this weekend

so i guess you just use VS Code to make these C# .net core projects? but the ide cant make the csproj file used to compile a bunch of .cs files. so you have to make and edit the csproj manually. or use an ide extension with a few thousand downloads that will add a context menu option to add/remove files to the csproj.

so i did that. and it works. not too bad i guess.

now i have a simple command line program that successfully opens a database connection. :slick: and it works on both windows and linux. i might replace a lot of my python scripts with C# now...

for some reason my executable is actually a dll though (lol?)

also the linux build produces .dll files too :wtf:

theyre dlls because they're not run directly like a real binary, they're loaded by dotnet core.

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

and they're still dlls on linux because they're not real dlls anyways who cares

cinci zoo sniper
Mar 15, 2013




whats a good pattern to teach somewhat new programmer (some r scripting experience, extremely good with sql) for multi-case error handling in python

e.g. what ive shown him now, for intuition's sake, is

Python code:
def findthings(foo):
    foo = None
    found = False
    if isinstance(foo, list):
       baz = foo[0]
       found = True
    elif isinstance(foo, dict):
       baz = foo
       found = True
    else:
       pass
    return baz if found else None
which is a trainwreck and absolute code gore in terms of code quality, refactoring, etcetera, but he has grasped this reasonably well so i dont try to overcomplicate things for his first time seeing python

normally, what i would do in that example
Python code:
def findthings(foo):
    # + optional assertions that baz confirms my expectations
    if isinstance(foo, list):
       baz = foo[0]
    elif isinstance(foo, dict):
       baz = foo
    return baz if "baz" in locals() else None
but there likely is something smarter people than me have figured out to optimally handle this

cinci zoo sniper fucked around with this message at 13:11 on Nov 12, 2017

cinci zoo sniper
Mar 15, 2013




c tp s: debugging my microwave

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Ator posted:

trying out .net core this weekend

so i guess you just use VS Code to make these C# .net core projects? but the ide cant make the csproj file used to compile a bunch of .cs files. so you have to make and edit the csproj manually. or use an ide extension with a few thousand downloads that will add a context menu option to add/remove files to the csproj.

so i did that. and it works. not too bad i guess.

now i have a simple command line program that successfully opens a database connection. :slick: and it works on both windows and linux. i might replace a lot of my python scripts with C# now...

for some reason my executable is actually a dll though (lol?)

also the linux build produces .dll files too :wtf:

why not use the jvm?

Adbot
ADBOT LOVES YOU

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost

cinci zoo sniper posted:

whats a good pattern to teach somewhat new programmer (some r scripting experience, extremely good with sql) for multi-case error handling in python

e.g. what ive shown him now, for intuition's sake, is

Python code:
def findthings(foo):
    foo = None
    found = False
    if isinstance(foo, list):
       baz = foo[0]
       found = True
    elif isinstance(foo, dict):
       baz = foo
       found = True
    else:
       pass
    return baz if found else None
which is a trainwreck and absolute code gore in terms of code quality, refactoring, etcetera, but he has grasped this reasonably well so i dont try to overcomplicate things for his first time seeing python

normally, what i would do in that example
Python code:
def findthings(foo):
    # + optional assertions that baz confirms my expectations
    if isinstance(foo, list):
       baz = foo[0]
    elif isinstance(foo, dict):
       baz = foo
    return baz if "baz" in locals() else None
but there likely is something smarter people than me have figured out to optimally handle this

actual python standard is to ask forgiveness not permission
aka, use try catch
you may find this idiotic. in which case, should prolly use the type annotation instead of isinstance too much, make something like Findable which can be list or dict

why this is less idiotic than one may imagine at first glance:
1. you may stomp on the thing in threading so you'd have to handle error anyways
2. exception handling tends to be more durable. classic example is, what if you check existence of file but don't have permission, now you have to think of permission

why this still may loop back to being exactly as idiotic:
1. lol threading in python lol multiprocessing in python
2. better to annoy the hell out of yourself relatively early in development than get in try catch hell

in this specific thing, I would frankly do something for abstract iterator tho

bob dobbs is dead fucked around with this message at 15:24 on Nov 12, 2017

  • Locked thread