Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 606 607 [608] 609 610 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 908665 times)

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #9105 on: February 22, 2016, 11:09:27 am »

Raaagh I am trying to install Torch and it hates me.

Mainly wanted to get that off my chest, but if you have any advice that's welcome too.

Of course, I actually have no idea how much of my trouble is caused by dicky* varsity wifi.

*I just realised this may cause confusion. The slang meaning I am aiming for here is 'unreliable' not 'impolite'.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #9106 on: February 22, 2016, 05:59:14 pm »

I finally figured out how to work Cython, and it's fast. My shittily-optimised code runs at an acceptable speed. I'm so happy.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9107 on: February 22, 2016, 07:01:45 pm »

Raaagh I am trying to install Torch and it hates me.
I found this to be a pain in the ass myself. What error messages is it shitting out at you? Also, what operating system, and are you trying to use a graphics card with it?
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

Moghjubar

  • Bay Watcher
  • Science gets you to space.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9108 on: February 22, 2016, 08:33:20 pm »

Got Vulkan to actually work last night after a bunch of trouble [understatement].  Said trouble involved yet another AMD beta driver update (they didn't even support 1.0.3 out of the gate so demos didnt work) and gnashing of teeth (trying to get it to work manually in mingw and converting stuff over and I got all the way near the end and I got hard crashes on function calls, yaaay).  Finally reinstalled Visual Studio to get the C++ pack (and everything else: turns out if you checkmark everything so you don't have to reinstall ever again its like 40+ gigs).

Man, Vulkan is definitely a marathon.  I don't know if I can go back to it for awhile (still gotta figure out exacly where I messed up).  Fair warning for anyone that dives into it: get help if you can.
Logged
Steam ID
Making things in Unity
Current Project: Demon Legend
Made This too (publisher abandoned ) Farworld Pioneers
Mastodon

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9109 on: February 22, 2016, 11:00:28 pm »

Yeah, Vulkan's target audience is mostly graphics programmers who know enough to write graphics drivers. That's literally why it exists, so graphics programmers can take over some of the job of the driver programmers and tailor the low level details to their needs.
Logged

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9110 on: February 23, 2016, 02:32:09 am »

I finally figured out how to work Cython, and it's fast. My shittily-optimised code runs at an acceptable speed. I'm so happy.
Nice!

I wouldn't worried about shittily-optimised code.  Some people think there's a right way and a wrong way but the truth is optimization is an infinitely deep well and its never truly finished.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #9111 on: February 23, 2016, 05:31:56 am »

Raaagh I am trying to install Torch and it hates me.
I found this to be a pain in the ass myself. What error messages is it shitting out at you? Also, what operating system, and are you trying to use a graphics card with it?

Quote
luajit: ./th:104: module 'trepl' not found:
   no field package.preload['trepl']
   no file './trepl.lua'
   no file '/usr/share/luajit-2.0.2/trepl.lua'
   no file '/usr/local/share/lua/5.1/trepl.lua'
   no file '/usr/local/share/lua/5.1/trepl/init.lua'
   no file '/usr/share/lua/5.1/trepl.lua'
   no file '/usr/share/lua/5.1/trepl/init.lua'
   no file './trepl.so'
   no file '/usr/local/lib/lua/5.1/trepl.so'
   no file '/usr/lib/x86_64-linux-gnu/lua/5.1/trepl.so'
   no file '/usr/lib/lua/5.1/trepl.so'
   no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
   [C]: in function 'require'
   ./th:104: in main chunk
   [C]: at 0x00404d60

On Linux Mint 17, and nope, I'm not trying to run it with a GPU.

Like, I assume that means that I don't have trepl installed, which isn't unreasonable (even though Torch is supposed to install trepl in their simplified install procedure). What does seem a bit odd is that the installation instructions for trepl are 'luarocks install trepl', which is an issue because luarocks doesn't seem to have trepl.

This is after I crawled through way too many hoops, including that LuaRocks does not seem to have all the stuff they think it does.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9112 on: February 23, 2016, 08:33:51 am »

... Okay that's beyond my experience. In a sane and just world, luarocks would indicate that it couldn't connect to the repository to download stuff, which would distinguish it from situations where the repository simply doesn't have it. So you'd get something like "couldn't connect" instead of "couldn't find module". But I don't actually know if it does that, and it certainly should have those things.

You probably found this already, but maybe start a thread?
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #9113 on: February 24, 2016, 06:24:33 am »

whaaaa

I just ran the Torch installer for the thousandth time and it inexplicably worked. Whaaaaat.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9114 on: February 24, 2016, 02:23:17 pm »

whaaaa

I just ran the Torch installer for the thousandth time and it inexplicably worked. Whaaaaat.


What are you going to use that for? I've seen a lot about it recently in regards to machine learning, but what do you want to do with it?

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #9115 on: February 24, 2016, 02:36:32 pm »

whaaaa

I just ran the Torch installer for the thousandth time and it inexplicably worked. Whaaaaat.


What are you going to use that for? I've seen a lot about it recently in regards to machine learning, but what do you want to do with it?

Machine learning. Specifically, recurrant neural nets for character-level text modelling.

I'm using this specific widget to try to fake LSP here (using sample code), but I've been messing around with neural nets for quite a while. There are a few other applications I have in mind for this (since what it does is essentially map one vector of any size onto another vector of any size), but I have got to insufficient grips with it to try them.

E: Recursive and recurrent may have the same root, but they are not the same. Whoops.
« Last Edit: February 24, 2016, 03:04:24 pm by Arx »
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9116 on: February 24, 2016, 03:22:14 pm »

I could swear recurrent neural nets were a subset of recursive neural nets, but perhaps my memory is flubbing this.
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #9117 on: February 24, 2016, 03:23:24 pm »

Better to be specific, either way.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Magnumcannon

  • Bay Watcher
  • Deep waters don't run still
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #9118 on: February 24, 2016, 04:39:32 pm »

Alright, so i'm trying to make a small python program which calculates quadratic equations. It's very buggy and inaccurate. Can someone give me a clue of why it is so inaccurate? I made this months ago and now i tried to improve it, but it gives me a "math domain error"
Code: [Select]
import math

a = int (raw_input ("Qual e o coeficiente 'a'?: "))
b = int (raw_input ("Qual e o coeficiente 'b'?: "))
c = int (raw_input ("Qual e o coeficiente 'c'?: "))
delta = (b**2)-4*a*c
xI = ((-b + (math.sqrt (delta))/2*a))
xII = ((-b - (math.sqrt (delta))/2*a))
xv = -b/(2*a)
yv = -delta/(4*a)
a_ccv = "cima" if a > 0 else "baixo"
b_crs = "crescendo" if b > 0 else "decrescendo"
n_raiz = "2 raizes diferentes" if delta > 0 else "2 raizes iguais" if delta == 0 else "nenhuma raiz real"
if (delta < 0):
    print ("a = %i b = %i, c = %i, delta nao e real (%i), xI nao e real e xII nao e real" %(a,b,c, delta))
else:
           print ("a = %i b = %i, c = %i, delta = %i, xI = %i e xII = %i" %(a,b,c,delta,xI,xII))       
print ("Xv = %i, Yv = %i" %(xv,yv))
print ("A concavidade da parabola se voltara para %s" %a_ccv)
print ("A parabola antingira o eixo y enquanto estiver %s" %b_crs)
print ("No eixo x ha %s" %n_raiz)
end0 = raw_input ('Digite qualquer coisa para sair')
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #9119 on: February 24, 2016, 04:50:00 pm »

math.sqrt() doesn't work with negative numbers (domain error), so probably delta is negative.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.
Pages: 1 ... 606 607 [608] 609 610 ... 796