Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411273 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 02:09:00 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 246 247 [248] 249 250 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 733190 times)
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4940 on: October 03, 2015, 10:08:30 PM »

python
PYTHON
PYTHON!!!!
 Huh? Hand Shake Right

Now I need a way to make python 2 and 3 work together with pycharm + zillion package dependency (across both python) with poor or specific documention formats just to run a single stuff Screamy

That's the easy language?  Outraged
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4941 on: October 03, 2015, 10:41:28 PM »

Python is a simple language, not an easy one. Distinctions. Wizard
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4942 on: October 03, 2015, 10:44:46 PM »

 Wizard   Lips Sealed
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4943 on: October 04, 2015, 10:49:39 AM »

BTW what are you even trying to run that requires both python 2 and 3???
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4944 on: October 04, 2015, 10:55:47 AM »

I have installed python 3 64bits and pygame unofficial 64bit

Now theano ask for python 2 (along with the usual zillion dependency like numpy and other)

for the short version
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4945 on: October 04, 2015, 10:57:56 AM »

And what do you need theano for? It's a math library, right?
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4946 on: October 04, 2015, 11:03:13 AM »

for heavy matrix operation using the gpu, like trying to compute "vector space model" whatever that mean, or running dnn, notably stylenet, and various experimentation, I'm following the trail
Logged

shellbot
Guest
« Reply #4947 on: October 05, 2015, 01:59:12 PM »

Have you tried using virtualenv?

It sounds like your in dependency hell which can sometimes be solved by making different environments that use different packages for different programs...

Unless you're using both python 3 and 2 in the same project... Then you're on your own my good fellow Gentleman
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4948 on: October 05, 2015, 03:53:52 PM »

Facing a bit of inertia getting used to Lisp. It's not actually the language paradigm that's getting me. It's that I just haven't memorized the standard keywords and function names.

The whole map/filter method of working is fine. That's something I've done less elegantly in imperative languages already.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4949 on: October 05, 2015, 06:11:14 PM »

Have you tried using virtualenv?

It sounds like your in dependency hell which can sometimes be solved by making different environments that use different packages for different programs...

Unless you're using both python 3 and 2 in the same project... Then you're on your own my good fellow Gentleman

To be frank I'm just starting with the python environment, let alone python (although I consider that less of a problem unless UNICODE  Tired ). The same for the tools and domain I'm learning python for (semantic stuff).

But I'll look at the key word you said, thanks  Wink
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #4950 on: October 13, 2015, 12:29:51 PM »

You cannot mix python 2 and 3 packages. You can have both python 2 and 3 installed, and separate packages for each, but you don't need virtualenv to do that and it probably won't let you achieve what you want. (virtualenv will let you have essentially multiple installs of the same python, with different packages loaded).

Fortunately, Theano supports python 3 (allegedly) and installs through pip (allegedly). It's possible you've already tried that, but if not, it'll definitely be the easiest way to get going.

Python for many years had an extememly poor package ecosystem, but pip finally seems to get things right.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4951 on: October 13, 2015, 01:46:40 PM »

Thanks for the information, I haven't come back yet to python right now, since I prioritize other tasks after finishing a previous task with python. However Theano explicitly mention ... After checking you are right Huh? I remember one of the needed package been advise under python 2.x and maybe 3 through python 2to3 converter (or something), then ensue a lot of confusing googling.
And ultimately I just need to find relevant data to be sure that installing one won't deinstall the other. I'm not familiar with pip yet, most python tutorial focus more on the language than the environement.
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #4952 on: October 13, 2015, 02:02:16 PM »

Python 2 and 3 are always completely separate, so you won't clobber one with the other. It's a bit confusing to have both on your system, and I'd recommend removing python 2 if you don't need it. In any case, you can write "pip3" rather than "pip" to force using the Python 3 version of pip - it'll know to only access python 3 packages, and install them into python 3 installation area. Assuming you have Python 3.4 or later, pip comes bundled, so you should just need type

pip3 install theano

and it'll do the rest, including downloading all required dependences. But theano has a great deal of dependencies and is still not version 1.0, so something could go wrong.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4953 on: October 13, 2015, 03:08:17 PM »

Thanks, I'll check that
Logged

Sik
Level 10
*****


View Profile WWW
« Reply #4954 on: October 14, 2015, 06:57:46 AM »

All this discussion about Python reminds me why I hate so much the idea behind semantic versioning, i.e. that a major version change means breaking backwards compatibility. Then you end up with stuff like this where two different things have the same name alongside all the confusion that comes with it.

Probably nothing is as steep as the Allegro 4 > 5 transition though. They have absolutely nothing in common, not even vaguely similar syntax or anything like that, why did they even think to keep the same name is beyond me.
Logged
Pockets
Level 0
**


View Profile
« Reply #4955 on: October 14, 2015, 08:44:18 AM »

This is probably something really silly I'm missing here but it's been driving me insane...

In class A, I have a list of listeners. In class B, I create an instance of A and add a listener. Then, the listener disappears from the list for no obvious reason; I can keep a reference to it in class B fine, so the object's not getting garbage-collected and it's all in my main server code which is single-threaded at the moment so it shouldn't be an issue with that, though I've tried fiddling with that just in case, didn't help any... it's just the reference randomly disappearing but only in class A. It's not even the list that's causing the problem, any reference to a listener that I *know* still bloody exists suddenly becomes null for no apparent reason, but only in class A. In class B, I still have a reference to it.

What the hell, Java? :|


Edit: disregard, I am dumb. I was instantiating A, then B, then calling b.set(a) and the listener stuff was all in B's constructor. What a waste of an afternoon.
« Last Edit: October 14, 2015, 11:35:11 AM by Pockets » Logged
oahda
Level 10
*****



View Profile
« Reply #4956 on: October 14, 2015, 12:45:56 PM »

Classic.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4957 on: October 15, 2015, 06:52:04 AM »

I dont know why but i seem to get crap like that happen to me in Java more frequently than most languages. Probably because of the insane ceremony of making a class with one method just to make a callback. Too many LOC where I might make a typo or brain fart.


btw: Last time I used Java was before lambdas existed in the language, I realize it's not quite as bad anymore.
Logged

Dacke
Level 10
*****



View Profile
« Reply #4958 on: October 15, 2015, 11:00:03 AM »

Even before lambdas you could usually just implement the callback via an interface in an existing class. Or create an anonymous class which is basically a clunky lambda.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4959 on: October 15, 2015, 05:12:47 PM »

Even before lambdas you could usually just implement the callback via an interface in an existing class. Or create an anonymous class which is basically a clunky lambda.

IIRC the anonymous class method was what I was doing. It's been so long I can't really remember though. Either way it definitely felt clunky. I do remember not being able to implement the function inline though.
Logged

Pages: 1 ... 246 247 [248] 249 250 ... 295
Print
Jump to:  

Theme orange-lt created by panic