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
Mahatma Goonsay
Jun 6, 2007
Yum
just stared learning python and I find it really funny that the answer to everything is a for in loop. arrays objects strings files whatever.

there are lambadas but the docs recommend using list comprehensions which of course use for in loops.

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Mahatma Goonsay posted:

just stared learning python and I find it really funny that the answer to everything is a for in loop. arrays objects strings files whatever.

there are lambadas but the docs recommend using list comprehensions which of course use for in loops.

foreach loops loving own

Bloody
Mar 3, 2013

applying functions over collections is better every time

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Bloody posted:

applying functions over collections is better every time

epic this ftw!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bloody posted:

applying functions over collections is better every time

Bloody
Mar 3, 2013

i just briefly, for just a couple of minutes, gazed into the abyss of attempting to automate an fpga toolchain

oh well didnt want any automation whatsoever anyways

Bloody
Mar 3, 2013

i have a bunch of xml files i need to manually dig through whats a good tool for looking around in xml files

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bloody posted:

i have a bunch of xml files i need to manually dig through whats a good tool for looking around in xml files

excel

Jerry Bindle
May 16, 2003
when someone asks you to hand-edit xml, respond as if they've told you to go gently caress yourself and flicked a cigarette at you're face

Jerry Bindle
May 16, 2003
eclipse has decent xml tooling

Captain Foo
May 11, 2004

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

the xml parsing lib in a plang of your choice

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
linqpad if you're on windows

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Captain Foo posted:

the xml parsing lib in a plang of your choice*




*)you don't have to use a plang, you can also use real language

Shaggar
Apr 26, 2006

Bloody posted:

applying functions over collections is better every time

as long as you are aware of how and when execution will be deferred and the potential risks of doing so.

Shaggar
Apr 26, 2006

Bloody posted:

i have a bunch of xml files i need to manually dig through whats a good tool for looking around in xml files

eclipse or vs, duh.

Captain Foo
May 11, 2004

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

Wheany posted:

*)you don't have to use a plang, you can also use real language

i know what thread i'm in

qntm
Jun 17, 2009

Bloody posted:

i have a bunch of xml files i need to manually dig through whats a good tool for looking around in xml files

but seriously though

Ctrl+F

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Mahatma Goonsay posted:

just stared learning python and I find it really funny that the answer to everything is a for in loop. arrays objects strings files whatever.

there are lambadas but the docs recommend using list comprehensions which of course use for in loops.

sometimes code golfing it's better to use curiously recursive class constructors

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

JewKiller 3000 posted:

oh come on mr president, what would you have to do to get an extra 20k from epic? threaten to move to somewhere hip, like milwaukee?

actually since ill be moving from the junior developer equivalent to a full developer at eoy, i'm guaranteed a 30k raise this year :D i will finally be a 6 figgy fucktard.

Baxate
Feb 1, 2011

VikingofRock posted:

I'll admit that I don't know perl, but what you wrote in perl doesn't really seem any nicer than what I wrote in sed

perl compatible regular expressions

pcre, bitch

NihilCredo
Jun 6, 2011

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

Shaggar posted:

as long as you are aware of how and when execution will be deferred and the potential risks of doing so.

or slap a .tolist at the end and call it a day

Soricidus
Oct 21, 2010
freedom-hating statist shill
or just use a for loop and suddenly your code is clear and its time and space complexity are both obvious.....but oh god it's more than a single line the horror the horror

Bloody
Mar 3, 2013

nuget is a dumb pain in the rear end

Bloody
Mar 3, 2013

i had to manually restore packages in jenkins' workspace (probably because jenkins' run of nuget wasnt using the proxy settings i was giving it maybe as a result of running as a different user? idk) but now it at least builds in jenkins GOOD ENOUGH

Shaggar
Apr 26, 2006
nuget blows but nuget 3 is way better than 2 and vs2015 nuget is better cause it useds dnu for package management instead of visual studio AND/OR nuget powershell commands

Bloody
Mar 3, 2013

lesson learned: shove your package binaries into git with everything else

gonadic io
Feb 16, 2011

>>=

Bloody posted:

lesson learned: shove your package binaries into git with everything else

i've recently started using git lfs for my unity project and it seems okay

that's my story.

simble
May 11, 2004

Bloody posted:

lesson learned: shove your package binaries into git with everything else

no don't... its too late hes already dead

Bloody
Mar 3, 2013

i havent shoved them in there yet

as usual, the issue is that every loving thing i do is kneecapped one way or another by our enterprise IT and usually its the proxy ugh

simble
May 11, 2004

nuget package restore is pretty good. when i have package problems i literally delete everything from my packages folder and just run restore. it usually fixes the problem and as an added benefit it might show me if i have mismatched versions of a package across all of the projects in my solution

Bloody
Mar 3, 2013

it works for me locally but doesnt work on the build server, which is the local machine.

simble
May 11, 2004

this link tells you how to restore packages in a variety of ways including with msbuild

https://docs.nuget.org/consume/package-restore

the most common way and the way i made it work was like this

http://pastie.org/private/mvspvqur4gt4eurdis8xjw#10,19-21,27,31

all of the appropriate lines are highlighted in yellow, but you can basically use this whole file as is in virtually any project

notice the RestorePackages target is depended upon by the other targets. this is in a file called build.proj which i have the build server (tfs/msbuild in my case) pointing to. i also have nuget.exe in the repo under a tools folder

if this helped, please upvote

AWWNAW
Dec 30, 2008

paket is alright too

jony neuemonic
Nov 13, 2009

jony neuemonic
Nov 13, 2009

i've been writing a bunch of perl again. i can't quit this dumb language.

cowboy beepboop
Feb 24, 2001

jony neuemonic posted:

i've been writing a bunch of perl again. i can't quit this dumb language.

i'm the chomp keyword

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

my stepdads beer posted:

i'm the chomp keyword

im the chop keyword, in that im shorter and badly-designed

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Soricidus posted:

or just use a for loop and suddenly your code is clear and its time and space complexity are both obvious.....but oh god it's more than a single line the horror the horror

depending on what you're doing exactly; for loops are usually far less clear than a linq method chain

Bloody
Mar 3, 2013

yeah linq method chains are extremely clear

where's that color-coded screenshot of a for loop vs a linq expr in terms of basically the same functionality (iteration/filtering/etc)

Adbot
ADBOT LOVES YOU

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Soricidus posted:

or just use a for loop and suddenly your code is clear and its time and space complexity are both obvious.....but oh god it's more than a single line the horror the horror

actually your code is usually less clear because its much easier to capture intent and meaning by applying functions than doing stuff in a loop

  • Locked thread