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
Notorious b.s.d.
Jan 25, 2003

by Reene

Arcsech posted:

oh and give it an incredibly lovely build tool

sbt is the worst thing about scala

Adbot
ADBOT LOVES YOU

VikingofRock
Aug 24, 2008




Notorious b.s.d. posted:

broken garbage collection
pypi

Interested in hearing more about these two.

Notorious b.s.d.
Jan 25, 2003

by Reene

VikingofRock posted:

Interested in hearing more about these two.

python has no garbage collector. it uses ref counting. substantially all python programs leak memory.

pypi. jesus. what a clusterfuck. it's exactly as bad as rubygems and cpan. compiling poo poo on the fly on the install target is not a viable deployment scenario.


Notorious b.s.d.
Jan 25, 2003

by Reene
i totally get the temptation that spawned cpan/rubygems/pypi

perl/ruby/python code is distributed as source, because source is all there is. they are interpreted languages. shipping a tarball of source code plus some metadata seemed like a really good idea

the problem is that then people started shipping C bindings that necessarily included C source code. so now the scripting language "package" systems are distributing source that has hidden dependencies on system libraries, source code that gets compiled on the spot, that sometimes, horror of horrors, downloads duplicate library source from the internet and compiles it

the best part of this, the real poo poo frosting on a blood sundae, is that you never get that poo poo patched, because you don't even know it exists.

pretty much every ruby/python user has at least one unpatched libxml2 running around from where nokogiri or lxml decided to build one on the sly

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?

fritz posted:

everything except embedded

a restricted subset of C++ is fine for embedded, especially since embedded no longer means "a couple hundred bytes of RAM at a couple MHz at most" for most cases.

better abstraction tools coupled with aggressive optimization can be way less error-prone than going full DIY for everything like most uses of C will wind up

Bloody
Mar 3, 2013

eschaton posted:

a restricted subset of C++ is fine for embedded, especially since embedded no longer means "a couple hundred bytes of RAM at a couple MHz at most" for most cases.

weird, that's basically my entire embedded world :smith:

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?

Notorious b.s.d. posted:

python has no garbage collector. it uses ref counting. substantially all python programs leak memory.

ref counting is a form of garbage collection

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:

weird, that's basically my entire embedded world :smith:

how's your decrement-and-branch-if-zero instruction working out?

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

eschaton posted:

ref counting is a form of garbage collection

yeah, that's why I won't answer the phone when your mom calls any more

Bloody
Mar 3, 2013

eschaton posted:

how's your decrement-and-branch-if-zero instruction working out?

not building that for sure and otherwise questionably!

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Nippashish posted:

oh cool. keras is one of the "fancy new nnet libraries" I was thinking of. have you figured out a nice way to make rnns in torch? ive tried like 4 or 5 different ways and all of them end up making some part of the process really annoying. are you writing your own or are you using andrej's code like everyone else?
my experiments are definitely influenced by karpathy's char-rnn library, but i'm writing my own because his code isn't modular (which is fair enough, since he wrote it as a tech demonstrator). i'm not happy w/ it yet though. i think the core problem is where to hold the recurrent state. right now i have the training alg pass the state between timesteps, with the network implementation only holding the weights. that lets me experiment easily, but it also forces my training algs to deal with network internals + slows things down.

Joe Law
Jun 30, 2008

modern c++ actually owns and is a good language that is only getting better. if you code like its 2003 it's an abomination that should be avoided at all costs

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
recently first day on a new project i got a mass fwd saying hey guys stop forgetting the brackets in delete[], its causing memory leaks.. lol

VikingofRock
Aug 24, 2008




Flat Daddy posted:

recently first day on a new project i got a mass fwd saying hey guys stop forgetting the brackets in delete[], its causing memory leaks.. lol

:eyepop:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Joe Law posted:

modern c++ actually owns and is a good language that is only getting better.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
the abstractions are actually becoming worth paying for, and the fact that they're optional makes it a pro choice wherever you can't just throw absurd amounts of hardware at your problems

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
or you'd like to throw absurd amounts of hardware at the problem and actually get most of the hardware applied to your problem

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Notorious b.s.d. posted:

the really bad stuff about python:

broken threading
broken garbage collection
hideous C api
pypi

it's true, this is all bad but I don't get your beef with reference counting. are you like a mark and sweep kind of dude?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

python has a really easy to use threading model actually

Soricidus
Oct 21, 2010
freedom-hating statist shill

fart simpson posted:

python has a really easy to use threading model actually

yeah, turns out it's easier to write threaded code when the threads don't actually execute concurrently

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
incidentally which ide do you use for lua? i'm using itorch notebook, and while it's great for poking around it feels a poor fit for developing a library

my ideal would be spyder-for-lua, but i can't find anything along those lines

Valeyard
Mar 30, 2012


Grimey Drawer

Notorious b.s.d. posted:

the really bad stuff about python:

broken threading
broken garbage collection
hideous C api
pypi

Threading isn't broken, as there is only a single thread

Bloody
Mar 3, 2013

Soricidus posted:

yeah, turns out it's easier to write threaded code when the threads don't actually execute concurrently

lol

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Soricidus posted:

yeah, turns out it's easier to write threaded code when the threads don't actually execute concurrently

Valeyard posted:

Threading isn't broken, as there is only a single thread

these guys get it

MononcQc
May 29, 2007

Notorious b.s.d. posted:

pypi. jesus. what a clusterfuck. it's exactly as bad as rubygems and cpan. compiling poo poo on the fly on the install target is not a viable deployment scenario.
Isn't python interpreted anyway?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

MononcQc posted:

Isn't python interpreted anyway?

sure. except for FFI bindings.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
like he said, it sounds like a good idea on the surface, but it isn't because you actually do have libs that depend on compiled code.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Dessert Rose posted:

like he said, it sounds like a good idea on the surface, but it isn't because you actually do have libs that depend on compiled code.

like what's a better solution? jw

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

MALE SHOEGAZE posted:

like what's a better solution? jw

distribute working binaries?

Soricidus
Oct 21, 2010
freedom-hating statist shill

Dessert Rose posted:

distribute working binaries?

so instead of having an insecure unpatched libxml2 that you don't know about that some module built from source, you have an insecure unpatched libxml2 that you don't know about that some module bundled as a binary?

also we have to live in the real world, where a lot of python runs on linux and distributing binaries for linux is painful to say the least

Nippashish
Nov 2, 2005

Let me see you dance!

coffeetable posted:

incidentally which ide do you use for lua? i'm using itorch notebook, and while it's great for poking around it feels a poor fit for developing a library

my ideal would be spyder-for-lua, but i can't find anything along those lines

i use atom atm. sublime is also ok. intellij actually has a p good lua plugin that can do some (limited) refactoring like renaming variables and whatnot, but intellij is totally unusable with a network drive.

its a shame that tooling in lua is so profoundly bad. i really miss pycharm.

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?

Dessert Rose posted:

like he said, it sounds like a good idea on the surface, but it isn't because you actually do have libs that depend on compiled code.

such as anything that wants to be fast

Share Bear
Apr 27, 2004

Soricidus posted:

so instead of having an insecure unpatched libxml2 that you don't know about that some module built from source, you have an insecure unpatched libxml2 that you don't know about that some module bundled as a binary?

also we have to live in the real world, where a lot of python runs on linux and distributing binaries for linux is painful to say the least

one of my coworkers has been using conda somewhat successfully for their python projects

distortion park
Apr 25, 2011


code:
 
public int Fart(int size) => size * size;
Woop

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
there was this python library that needed to compile some dumb C code and it was super broken on windows, I tried to talk with the author about it (because I didn't just want to rewrite the drat thing) to make this compilation step optional (which wasn't only on windows because...?)

he basically told me to gently caress off

open source is dispiriting sometimes

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
mongo db is JavaScript: the database

leftist heap
Feb 28, 2013

Fun Shoe

MALE SHOEGAZE posted:

like what's a better solution? jw

use a language that isn't so slow that it needs c libs for totally mundane poo poo?

Shaggar
Apr 26, 2006

NihilCredo posted:

or you can do this and let windows do all the work

code:
public function GetMeSomeTempShit as filestream
      return new filestream(path.gettemppath & path.getrandomfilename, 
                            filemode.create, 
                            fileaccess.readwrite,
                            fileshare.readwrite,
                            4096,
                            fileoptions.deleteonclose)
end function
i.e. will delete the file for you when you're done with it (all handles are closed), even if the program hard crashes :boom:

I tried using this once and found problems w/ it that I cant remember right now. it did clean it up for you and that was cool .

Shaggar
Apr 26, 2006

Notorious b.s.d. posted:

i totally get the temptation that spawned cpan/rubygems/pypi

perl/ruby/python code is distributed as source, because source is all there is. they are interpreted languages. shipping a tarball of source code plus some metadata seemed like a really good idea

the problem is that then people started shipping C bindings that necessarily included C source code. so now the scripting language "package" systems are distributing source that has hidden dependencies on system libraries, source code that gets compiled on the spot, that sometimes, horror of horrors, downloads duplicate library source from the internet and compiles it

the best part of this, the real poo poo frosting on a blood sundae, is that you never get that poo poo patched, because you don't even know it exists.

pretty much every ruby/python user has at least one unpatched libxml2 running around from where nokogiri or lxml decided to build one on the sly

the thing that makes that concept even worse is that java lets you do the same thing, but with a better structure since source and javadocs can be in separate packages for the same artifact. the one thing those languages kind of had going for them is done 1000000x better in java.

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
oh, I remember what my problem w/ the file autodelete thing was. I was creating a temp file that was going to be passed as an argument to an external application, but when you create an autoclosing handle like that it creates it in exclusive read or something so only your process can read it. that meant the external app couldn't read the file while mine was running and if I ended mine then it deleted the file. pwnt.

I ended up using a more thorough IDisposable temp file.

  • Locked thread