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.
 
  • Post
  • Reply
Bloody
Mar 3, 2013

Nomnom Cookie posted:

code scala, commit to git, bike home, drink an old fashioned, play with your corgi

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

Shaggar posted:

actually you know what would be even more hilarious? is that if instead of converting the goofy bbcode to html on the server side they just spat it out directly and then used javascript to parse, format, and display it.

http://strapdownjs.com/

Bloody
Mar 3, 2013

ultramiraculous posted:

could he not run it through the pcb equivalent of a static analyzer? it seems like most cad software lets you check for common points of failure.

pressing the design rule check button is difficult okay

Bloody
Mar 3, 2013

why would a person consider c but never c++

it's the same language

nobody is forcing you to use the uglier parts of c++

Bloody
Mar 3, 2013

ratbert90 posted:

Back in the day C++ compilers sucked dick.

Also why can't I just use a struct and not be loving retarded when accessing my structs? Seems easier to me so idk why you would use C++ when the entire thing can be replaced with structs and pointers to pointers. Unless you are retarded, then feel free to use C++.

you can but then sometimes you want to use someone's awful library that is only available as undocumented c++ source so even though your codebase is basically just C you still have to compile with g++

also std::vector is pretty handy imo

Bloody
Mar 3, 2013

more like dICK posted:

You're literally the only person who's made a good post in this thread in 2013

thanks for pointing out the problem???

Bloody
Mar 3, 2013

Plastic Snake posted:

terrablelang dot org

should forward randomly to a plang's site

Bloody
Mar 3, 2013

ive tried using xaml a few times and every single time i use it i feel like im relearning how to do anything and i wind up with hideous abominations

no loving clue what an mvvm is but it sounds like a mess

Bloody
Mar 3, 2013

why

i like c# so that hurdle is taken care of

Bloody
Mar 3, 2013

Shaggar posted:

b/c abstracting the ui from code is the right way to do it

why not do it in a way that doesnt make me write xml or kill myself when data bindings are hideously counterintuitive and/or nonfunctional

keep in mind that i belong in the terrible programmers thread

Bloody
Mar 3, 2013

Shaggar posted:

sorry ur too dumb to do simple things

duh

but thanks for the sympathy

Bloody
Mar 3, 2013

so how do i make uis without wanting to kill myself

like whats the form builder app of choice or whatever

Bloody
Mar 3, 2013

you people are autistic about the weirdest poo poo

oh no some esoteric poo poo about types

does that ever matter in the stupid crud apps you make anyways

Bloody
Mar 3, 2013

did you know there are languages that dont even have types i mean how do they even survive

Bloody
Mar 3, 2013

vapid cutlery posted:

they do have types, internally. typically they just automatically convert between the various types for you

(void*) doesnt give a gently caress

Bloody
Mar 3, 2013

vapid cutlery posted:

in some languages type is determined by the operations an object supports, so some objects can actually pretend to be a bunch of types. it's called dog typing. "if it sleeps like a dog, and it barks like a dog, then it's a dog." - guido van possum

isnt that duck typing

types are dumb

programming is dumb

is it too late to change lives

Bloody
Mar 3, 2013

spongeh posted:

java script: simcity
java: minecraft

checkmate, nerds, javascript owns

lol

Bloody
Mar 3, 2013

Suspicious Dish posted:

# Detect LLVM and set various variable to link against the different component of LLVM
#
# NOTE: This is a modified version of the module originally found in the OpenGTL project
# at https://www.opengtl.org
#
# LLVM_BIN_DIR : directory with LLVM binaries
# LLVM_LIB_DIR : directory with LLVM library
# LLVM_INCLUDE_DIR : directory with LLVM include
#
# LLVM_COMPILE_FLAGS : compile flags needed to build a program using LLVM headers
# LLVM_LDFLAGS : ldflags needed to link
# LLVM_LIBS_CORE : ldflags needed to link against a LLVM core library
# LLVM_LIBS_JIT : ldflags needed to link against a LLVM JIT
# LLVM_LIBS_JIT_OBJECTS : objects you need to add to your source when using LLVM JIT

if(WIN32)
find_path(LLVM_INCLUDE_DIR NAMES llvm/LLVMContext.h)
message(STATUS "Found LLVM include directory: ${LLVM_INCLUDE_DIR}")
find_library(LLVM_SOMELIB NAMES LLVMCore)
GET_FILENAME_COMPONENT(LLVM_LIB_DIR ${LLVM_SOMELIB} PATH CACHE)
message(STATUS "Found LLVM lib directory: ${LLVM_LIB_DIR}")

#Starting from 3.0, that file exists
find_path(LLVM_3_0 NAMES llvm/Support/TargetSelect.h)
if(LLVM_3_0)
set(LLVM_STRING_VERSION "3.0")
set(LLVM_LIBS_CORE LLVMLinker LLVMArchive LLVMBitWriter LLVMBitReader LLVMInstrumentation LLVMipo LLVMInstCombine)
set(LLVM_LIBS_JIT LLVMX86AsmParser LLVMX86AsmPrinter LLVMX86CodeGen LLVMX86Desc LLVMSelectionDAG LLVMAsmPrinter LLVMX86Utils LLVMX86Info LLVMJIT LLVMExecutionEngine LLVMCodeGen LLVMScalarOpts LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMMC LLVMCore LLVMSupport)
else()
set(LLVM_STRING_VERSION "2.8")
set(LLVM_LIBS_CORE LLVMLinker LLVMArchive LLVMBitWriter LLVMBitReader LLVMInstrumentation LLVMScalarOpts LLVMipo LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMSystem LLVMInstCombine)
set(LLVM_LIBS_JIT LLVMX86AsmParser LLVMX86AsmPrinter LLVMX86CodeGen LLVMSelectionDAG LLVMAsmPrinter LLVMX86Info LLVMJIT LLVMExecutionEngine LLVMCodeGen LLVMScalarOpts LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMSystem)
endif()
message(STATUS "_Guessed_ LLVM version ${LLVM_STRING_VERSION}")
set(LLVM_COMPILE_FLAGS "")
set(LLVM_LDFLAGS "")
set(LLVM_LIBS_JIT_OBJECTS "")
endif (WIN32)

if (LLVM_INCLUDE_DIR)
set(LLVM_FOUND TRUE)
else (LLVM_INCLUDE_DIR)

find_program(LLVM_CONFIG_EXECUTABLE
NAMES llvm-config
PATHS
/opt/local/bin
/opt/llvm/2.7/bin
/opt/llvm/bin
/usr/lib/llvm-2.7/bin
/usr/lib/llvm-2.8/bin
/usr/lib/llvm-2.9/bin
/usr/lib/llvm-3.0/bin
/usr/lib/llvm-3.1/bin
/usr/lib/llvm-3.2/bin
/usr/lib/llvm-3.3/bin
)

find_program(LLVM_GCC_EXECUTABLE
NAMES llvm-gcc llvmgcc
PATHS
/opt/local/bin
/opt/llvm/2.7/bin
/opt/llvm/bin
/Developer/usr/bin
/usr/lib/llvm-2.7/bin
)

find_program(LLVM_GXX_EXECUTABLE
NAMES llvm-g++ llvmg++
PATHS
/opt/local/bin
/opt/llvm/2.7/bin
/opt/llvm/bin
/Developer/usr/bin
/usr/lib/llvm/llvm/gcc-4.2/bin
/usr/lib/llvm-2.7/bin
)

if(LLVM_GCC_EXECUTABLE)
MESSAGE(STATUS "LLVM llvm-gcc found at: ${LLVM_GCC_EXECUTABLE}")
#CMAKE_FORCE_C_COMPILER(${LLVM_GCC_EXECUTABLE} GNU)
endif(LLVM_GCC_EXECUTABLE)

if(LLVM_GXX_EXECUTABLE)
MESSAGE(STATUS "LLVM llvm-g++ found at: ${LLVM_GXX_EXECUTABLE}")
#CMAKE_FORCE_CXX_COMPILER(${LLVM_GXX_EXECUTABLE} GNU)
endif(LLVM_GXX_EXECUTABLE)

if(LLVM_CONFIG_EXECUTABLE)
MESSAGE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
else(LLVM_CONFIG_EXECUTABLE)
MESSAGE(FATAL_ERROR "Could NOT find LLVM executable")
endif(LLVM_CONFIG_EXECUTABLE)

MACRO(FIND_LLVM_LIBS LLVM_CONFIG_EXECUTABLE _libname_ LIB_VAR OBJECT_VAR)
exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --libs ${_libname_} OUTPUT_VARIABLE ${LIB_VAR} )
STRING(REGEX MATCHALL "[^ ]*[.]o[ $]" ${OBJECT_VAR} ${${LIB_VAR}})
SEPARATE_ARGUMENTS(${OBJECT_VAR})
STRING(REGEX REPLACE "[^ ]*[.]o[ $]" "" ${LIB_VAR} ${${LIB_VAR}})
SEPARATE_ARGUMENTS(${LIB_VAR})
ENDMACRO(FIND_LLVM_LIBS)


# this function borrowed from PlPlot, Copyright (C) 2006 Alan W. Irwin
function(TRANSFORM_VERSION numerical_result version)
# internal_version ignores everything in version after any character that
# is not 0-9 or ".". This should take care of the case when there is
# some non-numerical data in the patch version.
#message(STATUS "DEBUG: version = ${version}")
string(REGEX REPLACE "^([0-9.]+).*$" "\\1" internal_version ${version})

# internal_version is normally a period-delimited triplet string of the form
# "major.minor.patch", but patch and/or minor could be missing.
# Transform internal_version into a numerical result that can be compared.
string(REGEX REPLACE "^([0-9]*).+$" "\\1" major ${internal_version})
string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" minor ${internal_version})
#string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" patch ${internal_version})

#if(NOT patch MATCHES "[0-9]+")
# set(patch 0)
#endif(NOT patch MATCHES "[0-9]+")
set(patch 0)

if(NOT minor MATCHES "[0-9]+")
set(minor 0)
endif(NOT minor MATCHES "[0-9]+")

if(NOT major MATCHES "[0-9]+")
set(major 0)
endif(NOT major MATCHES "[0-9]+")
#message(STATUS "DEBUG: internal_version = ${internal_version}")
#message(STATUS "DEBUG: major = ${major}")
#message(STATUS "DEBUG: minor= ${minor}")
#message(STATUS "DEBUG: patch = ${patch}")
math(EXPR internal_numerical_result
#"${major}*1000000 + ${minor}*1000 + ${patch}"
"${major}*1000000 + ${minor}*1000"
)
#message(STATUS "DEBUG: ${numerical_result} = ${internal_numerical_result}")
set(${numerical_result} ${internal_numerical_result} PARENT_SCOPE)
endfunction(TRANSFORM_VERSION)


exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE LLVM_STRING_VERSION )
MESSAGE(STATUS "LLVM version: " ${LLVM_STRING_VERSION})
transform_version(LLVM_VERSION ${LLVM_STRING_VERSION})

exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --bindir OUTPUT_VARIABLE LLVM_BIN_DIR )
exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libdir OUTPUT_VARIABLE LLVM_LIB_DIR )
#MESSAGE(STATUS "LLVM lib dir: " ${LLVM_LIB_DIR})
exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIR )

INCLUDE(CheckIncludeFileCXX)
set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR})
check_include_file_cxx("llvm/Support/TargetSelect.h" HAVE_SUPPORT_TARGETSELECT_H)
unset(CMAKE_REQUIRED_INCLUDES)
MESSAGE(STATUS "HAVE_SUPPORT_TARGETSELECT_H: " ${HAVE_SUPPORT_TARGETSELECT_H})
IF(HAVE_SUPPORT_TARGETSELECT_H)
ADD_DEFINITIONS(-DHAVE_SUPPORT_TARGETSELECT_H)
ENDIF(HAVE_SUPPORT_TARGETSELECT_H)

set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR})
set(CMAKE_REQUIRED_DEFINITIONS -D__STDC_LIMIT_MACROS=1 -D__STDC_CONSTANT_MACROS=1)
check_include_file_cxx("llvm/IRBuilder.h" HAVE_IRBUILDER_H)
unset(CMAKE_REQUIRED_INCLUDES)
MESSAGE(STATUS "HAVE_IRBUILDER_H: " ${HAVE_IRBUILDER_H})
IF(HAVE_IRBUILDER_H)
ADD_DEFINITIONS(-DHAVE_IRBUILDER_H)
ENDIF(HAVE_IRBUILDER_H)

set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR})
check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H)
check_include_file_cxx("llvm/IR/DataLayout.h" HAVE_IR_DATALAYOUT_H)
unset(CMAKE_REQUIRED_INCLUDES)
MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H})
MESSAGE(STATUS "HAVE_IR_DATALAYOUT_H: " ${HAVE_IR_DATALAYOUT_H})
IF(HAVE_DATALAYOUT_H)
ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H)
ENDIF(HAVE_DATALAYOUT_H)
IF(HAVE_IR_DATALAYOUT_H)
ADD_DEFINITIONS(-DHAVE_IR_DATALAYOUT_H)
ENDIF(HAVE_IR_DATALAYOUT_H)

exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS )
MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS})
exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS )
MESSAGE(STATUS "LLVM LD flags: " ${LLVM_LDFLAGS})
FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "core ipa ipo instrumentation bitreader bitwriter linker" LLVM_LIBS_CORE LLVM_LIBS_CORE_OBJECTS )
MESSAGE(STATUS "LLVM core libs: " ${LLVM_LIBS_CORE})
IF(APPLE AND UNIVERSAL)
FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native x86 PowerPC ARM" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS )
ELSE(APPLE AND UNIVERSAL)
FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS )
ENDIF(APPLE AND UNIVERSAL)
MESSAGE(STATUS "LLVM JIT libs: " ${LLVM_LIBS_JIT})
MESSAGE(STATUS "LLVM JIT objs: " ${LLVM_LIBS_JIT_OBJECTS})

if(LLVM_INCLUDE_DIR)
set(LLVM_FOUND TRUE)
endif(LLVM_INCLUDE_DIR)

if(LLVM_FOUND)
message(STATUS "Found LLVM: ${LLVM_INCLUDE_DIR}")
else(LLVM_FOUND)
if(LLVM_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find LLVM")
endif(LLVM_FIND_REQUIRED)
endif(LLVM_FOUND)

endif (LLVM_INCLUDE_DIR)
same

Bloody
Mar 3, 2013

Jonny 290 posted:

yeah that will prob work tbqh

im going to start looking at heatmap libraries so i can make some crime maps


phase 2 is databasing the intake log records, and those have names and addresses, and that is when this here data mine will start to be really fun

matlab

Bloody
Mar 3, 2013

Mr Dog posted:

they don't have JTAG

NOPE

Mr Dog posted:

Synopsys
NOOOOOOOOOOOPE



although to be honest those wonder geckos look pretty sweet if my project continues on i may actually have to check those out because id kinda like a very low power arm at this point

just looked at the datasheet hot drat that's low power that's almost msp430 territory

Bloody fucked around with this message at 16:10 on Jun 26, 2013

Bloody
Mar 3, 2013

tef posted:

dear yospos

i'm gonna be doing a new jerb where I sorta you know write code, give talks and generally do a whole bunch of poo poo to mean that people can help kids learn through play

please give me a job title

autism specialist

Bloody
Mar 3, 2013

MononcQc posted:

ProgrammerFactoryFactory

Bloody
Mar 3, 2013

Stringent posted:

Teflon: No matter how many times he makes a point it never sticks!

(too long for a business card I guess)

if you need to explain your joke,

Bloody
Mar 3, 2013

missed 18 and 23 then felt bad when i saw them

almost forgot 4 and entering 14 made me feel unclean

Bloody
Mar 3, 2013

PrBacterio posted:

I missed it too, and the reason is that, although I guess it technically speaking does count as a programming language, it's hardly ever used as such
like, if XML had features that made it equivalent to a turing machine (I dont know, it might even have them), would it then count as a programming language even though thats not the normal use case for it?
I also didnt get actionscript, because I didnt count it as a separate language from javascript;
haskell, because I honestly didnt think it was popular enough to make it on that list;
cf and delphi because... wtf? are people really still using those?

keep in mind the quiz was made in 2009

Bloody
Mar 3, 2013

MeruFM posted:

Competitive coders love the D

lol
u forgot a word

Bloody
Mar 3, 2013

Shinku ABOOKEN posted:

if it was so good why is it dead?

why is php alive?

Bloody
Mar 3, 2013

PleasingFungus posted:

tef I have no idea how to message you directly (i don't have one of those newfangled 'twitters' and you have PMs off), but you put a post here earlier talking about the problem of gentrification in the SF Bay Area, so

have this I guess

waaaah people with money are making a place less lovely??

Bloody
Mar 3, 2013

gucci void main posted:

please hate programming

no it must retain the recursion

php hates programmers

Bloody
Mar 3, 2013

how the hell can you be so awful as to take four hours to set up a development environment

just install visual studio

it just works

Bloody
Mar 3, 2013

b0red posted:

You'd think students would Google around about development environments before they take a programming class. Or at least learn about basic OS command line commands and file structures.

no, actually, you'd be better off thinking whatever the exact opposite of that is

Bloody
Mar 3, 2013


yeah pretty much

i had to implement my own sd card hal and fat32 on top of it once in a bare metal application with like 512 bytes of ram and it was awful

not to mention the entire development toolchain blew

embedded programming is normal programming's second cousin or perverted uncle or something at this point

Bloody
Mar 3, 2013

MeruFM posted:

this is for work?

takes reinventing the wheel to a whole new level

yep. it was a... uh... cool learning experience, i guess.

Bloody
Mar 3, 2013

Mr Dog posted:

I bang this drum a lot but programming for Cortex-M stuff is a lot nicer than some fuckshow MSP430 or whatever, you use the same GCC you'd use on your desktop, and there are harder things involved in embedded programming than writing a linker script or a makefile, especially for something simple.

OTOH uh I'm trying to deal with something involving a Teensy3 right now, which uses a Freescale MCU, and that thing is certainly some poo poo

did I mention that flash config page in the middle of flash that can totally lock out ISP and brick the chip if you accidentally write code there?

also apparently the peripherals have a different endian-ness to the CPU :psyduck: why the gently caress is this a thing

calling arm coding these days embedded is pretty disingenuous at least in my mind

to me, embedded is reinventing the wheel every goddamn hour and feeling blessed to have a compiler and like any documentation at all

arm is just like well i have to call a slightly different version of gcc

embedded horror stories are my favorite though :allears:

Bloody
Mar 3, 2013

tef posted:

i still have flashbacks to that code.

the last time I explained how it worked the listener curled up into a ball and went aaaaaaaaaaa help aaaaaaa

that was because u were talking 2 them about vb

Bloody
Mar 3, 2013

shrughes posted:

code complete is by and for retards

so programmers

Bloody
Mar 3, 2013

Mr Dog posted:

It's embedded if you don't have enough RAM to run Linux on it, as far as I'm concerned :colbert:

afaik you need a minimum of 16MB for even embedded lunix, which means you need DRAM which is really loving hard to design PCB traces for apparently. idk this is a bit beyond my meager level.

Something like FreeRTOS seems like a good compromise. I don't know too much about FreeRTOS, I just really regret not using it for my big grad school project which ended up turning into some gigantic continuation-passing horror show.

eh you can get that much RAM with various forms of garbage ram such as serial ram it's just gonna be a pos

i have yet to actually design my own arm board though but im looking forward to it. i don't think dram should be particularly difficult to lay out for; the specs exist... just keep adding layers until it all works.

Bloody
Mar 3, 2013

the second you start a nodejs project you have started to write legacy poo poo


on the flipside nobody using nodejs will still be in business in 10 years so nobody will have to maintain it

(on the offchance one of them is still in business they will have already migrated to new hip technology x at least a dozen times by then)

Bloody
Mar 3, 2013

Cocoa Crispies posted:

code:
arDrone = require 'ar-drone'
http = require 'http'
socket = require 'socket.io'
staticFile = require 'node-static'

client = arDrone.createClient()
console.log client.config 'general:navdata_demo', 'FALSE'

file = new staticFile.Server('./public')

server = http.createServer (req, res) ->
  file.serve req, res, (err, result) ->
    if err
      console.log "error #{req.url} #{err.message}"
      res.writeHead err.status, err.headers
      res.end
server.listen 8080, ->
  console.log "listening"

io = socket.listen(server)

io.sockets.on 'connection', (socket) ->
  socket.on 'client_ok', (data) ->
    console.log client.config 'general:navdata_demo', 'FALSE'
    dataStream = arDrone.createUdpNavdataStream()

    dataStream.on 'data', (navdata) ->
      console.log navdata
      try
        parcel = 
          'rotation': navdata['demo']['rotation'] || undefined
          'heading': navdata['magneto']['heading']
          'velocity': navdata['demo']['velocity']
      catch TypeError
        parcel = 
          'rotation': {}
          'heading': {}
          'velocity': {}
          'navdata': navdata

      console.log parcel

      socket.emit 'navdata', parcel

im the robot control loop that's dependent on sockets, io, http, and servers

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

Shinku ABOOKEN posted:

so i'm doing a little project in cpp and i can't tell if i'm leaking objects or not or whatever.

you are

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply