Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - adarqui

Pages: 1 ... 797 798 [799] 800 801 ... 1504
11971
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 04, 2016, 06:07:03 am »
finished integrating this "board packs" thing I was talking about yesterday.. just prior to 6 AM (the goal).

it's just the joining together of several data structures, returning it all in one call. But just for shits & giggles, here's an example. This is a "board pack" which gives me data for a: Board, BoardStat, Thread, ThreadPost, and the User who posted it:

Code: [Select]
{
  boards_packs: [
  {
    latest_thread_post: {
      thread_id: 1,
      modified_by: null,
      body: {
        data: "latest?",
        schema: "post_data_request",
        type: "post_data_bbcode",
        v: 1
      },
      modified_at: "2016-04-04T07:52:34.059885000000Z",
      schema: "thread_post_response",
      created_by: 1,
      created_at: "2016-04-04T07:52:34.059885000000Z",
      id: 19878,
      title: null,
      user_id: 1,
      v: 1,
      parent_id: null
    },
    latest_thread_post_user: {
      email_md5: "b2eff1bf71b3445e307ec91e4018d24c",
      nick: "andrewdarqui",
      schema: "user_sanitized_response",
      display_nick: "andrewdarqui",
      created_at: "2016-04-04T07:30:33.174801000000Z",
      id: 1,
      v: 1,
      is_active: false
    },
    schema: "board_pack_response",
    board_stat: {
      views: 0,
      schema: "board_stat_response",
      thread_posts: 11,
      threads: 5,
      board_id: 1,
      v: 1
    },
    board: {
      modified_by: null,
      modified_at: null,
      schema: "board_response",
      forum_id: 1,
      created_by: 1,
      name: "board",
      created_at: "2016-01-19T02:43:08.357499000000Z",
      id: 1,
      v: 1,
      parent_id: null,
      desc: "board desc"
    },
    latest_thread: {
      sticky: false,
      locked: false,
      modified_by: null,
      modified_at: "2016-04-02T21:36:22.870992000000Z",
      schema: "thread_response",
      created_by: 1,
      poll: null,
      name: "Test Thread",
      activity_at: "2016-04-04T07:52:34.059885000000Z",
      created_at: "2016-01-19T20:19:58.389153000000Z",
      id: 1,
      board_id: 1,
      v: 1,
      desc: "A thread for testing"
    },
    v: 1
  }
  ],
  schema: "boards_packs_responses",
  v: 1
}


nothing amazing but.. stuff like that is going to make the forum code i'm doing really model what we already have. I now have it showing latest post in the board view and simple stuff like that.

I refactored so much code today, it's pretty ridiculous.

pC!

11972
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 04, 2016, 05:56:42 am »
146?!

ya i dno, weird right? ;f


Quote
That's lighter than my highschool days. I weighed 67 kg back then. 144 = 66 kg. The least I've ever weighed was 64 kg when I was 21, due to eating 1 per day off ~5$ per day, me and my mom. So I was living with 2.5$ per day for food then.

damn

i think i lived off of ~$5 for food or less in h.s. too. i wasn't a good eater back then, but i played tonssss of basketball.. so needless to say, was skinny as fuck.

i remember when I wasn't self conscious at all in h.s.. but i took my shirt off after basketball, and some teammates mentioned how caved in my chest was.. i always remember that because, prior to that moment, I never actually thought about any of that. I just played bball all day and was getting into computers. stuff like that didn't even cross my mind.

HEH!

11973
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 04, 2016, 05:17:12 am »
04/03/2016

Bio: Morning

sleep = 8 hours
wakeup = 2 PM
bw = 146  :wowthatwasnutswtf:
morning resting heart rate = didn't measure
soreness = hamstrings slightly, adductors alot (especially right)
aches = right tennis elbow slightly
injuries = toenails wrekt
feel = good



Food

2:30 PM

- greek yogurt
- banana
- green tea



Food

9 PM

- huge bowl of lentils with carrots, potatoes, various peppers, garlic, olives, herbs, etc
- chicken sandwich
- a bunch of black bean chips



Food

10 PM

- small bit of java chip ice cream
- mint tea



Session: Recovery

12 AM

- iced right elbow for ~30 minutes



so stuffed from dinner.. massive amount of lentils ;f

body feels pretty wrecked today.. all of those sprints yesterday taxed my adductors hard.

REFACTORING CODE ALL DAY.. sokdogk203k-0fke021EK!@O!K@$OJ@!o

11974
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 03, 2016, 03:09:24 pm »
did you figure out what was wrong with that piece of code?

the code i posted actually works. the whole problem was, that I was writing a local definition for that instead of a function by itself (with a type signature, the q :: forall. part). Without the type signature, haskell persistent was going crazy about the types.  I can probably clean that up quite a bit today. I need to do several of those functions to retrieve statistics on various routes: organizations, users, forums, boards, threads, thread posts etc.

:D




So this is how my life is going to look.

probably not, unless you eventually get into functional programming..

that's a SQL (postgresql) query written in a haskell DSL called Esqueleto ;f Haskell uses lots of symbols and such, which can look confusing if you don't know what they mean.

i'm writing the forum etc in haskell (backend) & purescript (frontend), two purely functional programming languages. Haskell has given me the most fun of any programming language, but, it's also been the hardest to learn. It has a nice initial simple learning curve in regards to the basics.. but then, to actually become pro with it, the learning curve is steep.

it's alot of fun though.. more-so than programming in other langs, IMHO. So eventually this forum will be written in haskell + purescript, for the first draft. When haskell improves their full-stack libs (ghcjs), i'll consider porting the front-end to haskell, even though I love purescript. The problem with using two languages is, I have to write my types/structures in both languages.. so there's lots of redundancy there. If I write a User { name :: String, age :: Int } in haskell, I have to do the exact same thing in purescript. There are actually tools now which can auto-generate purescript types from haskell types, but, not to my liking (yet). Full-stack haskell would be alot more efficient.

That code above can be cleaned up to:

Code: [Select]
q :: forall site.
     (YesodPersist site, YesodPersistBackend site ~ SqlBackend) =>
     Key Board -> HandlerT site IO [(Value Int64, Value Int64, Value Int64)]
q board_id = do
  runDB
    $ select
    $ from $ \(thread_post `E.LeftOuterJoin` thread `E.LeftOuterJoin` board) -> do

      on $ thread ^. ThreadBoardId ==. board ^. BoardId
      on $ thread_post ^. ThreadPostThreadId ==. thread ^. ThreadId

      where_ $ board ^. BoardId ==. val board_id

      return (countDistinct $ board ^. BoardId, countDistinct $ thread ^. ThreadId, countDistinct $ thread_post ^. ThreadPostId)

not too much cleaner but.. easier on the eyes than before.

pc!



edit: I had to modify it slightly because of the whitespace issue in forum posts.. new forum actually has 'codecs': raw, bbcode, code, other etc.. so, will have no issue pasting code. ;f

11975
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 03, 2016, 06:16:26 am »
it's really hard for me to sleep when I can't figure something out.. that's why I usually don't try and figure complex things out after 12 AM or so.

this simple piece of code took me 3 hours to figure out.. I was overlooking something for a lonnnnnng time.

Code: [Select]
q4 :: forall site.
     (YesodPersist site, YesodPersistBackend site ~ SqlBackend) =>
     Key Board -> HandlerT site IO [(E.Value Int64, E.Value Int64, E.Value Int64)]
q4 board_id = do
  runDB
    $ E.select
    $ E.from $ \((thread_post :: E.SqlExpr (Entity ThreadPost)) `E.LeftOuterJoin` (thread :: E.SqlExpr (Entity
Thread)) `E.LeftOuterJoin` (board :: E.SqlExpr (Entity Board))) -> do
      E.on $ thread ^. ThreadBoardId E.==. board ^. BoardId
      E.on $ thread_post ^. ThreadPostThreadId E.==. thread ^. ThreadId
      E.where_ $
        board ^. BoardId E.==. E.val board_id
      return (E.countDistinct $ board ^. BoardId, E.countDistinct $ thread ^. ThreadId, E.countDistinct $
thread_post ^. ThreadPostId)

now, i go lie down and die.

11976
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 03, 2016, 03:55:48 am »
legs felt surprisingly good today after all of those jumps. felt good, less power though.



04/02/2016

Bio: Morning

sleep = 10 hours
- guess i needed the extra sleep
wakeup = 3 PM
- eek
bw = 148
morning resting heart rate = didn't measure
soreness = hamstrings slightly
aches = right tennis elbow slightly
injuries = toenails wrekt
feel = good



Food

3 PM

- greek yogurt
- banana
- pure sugarless green tea



Food

6 PM

- banana



Session: Evening

run: slow jog with sprints mixed in
- connect.garmin.com is down so, i forget my actual total mileage/time..
- ~9.4 mi in 1.5 hours
- max-speed: 12.3 mph
- did tons of short sprints
- had to loosen up my left shoe, felt the top of my foot hurting out of nowhere



Food

10 PM

- big bowl of cheerios + honey + 2% milk
- sausage egg and cheese on pumpernickel bagel
- half of a chocolate muffin
- orange juice
- hot mint tea



Food

2 AM

- banana
- orange
- greek yogurt



man i love oranges.

i've been throwing a tennis ball in the house for my dog (while coding), for literally over 2 hours. he's a nutcase.

tmw i'd like to get a run+jump session in.

pc!

11977
Boxing / Re: Boxing Fights 04/01/2016
« on: April 02, 2016, 03:24:17 pm »
hahahaha


11978
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 02, 2016, 03:20:25 pm »
I always wondered - do you do that with a phone with the GPS turned on in one of your pockets or how?

nah, like maxent pointed out, garmin gps watch. I prefer the watch, i forget it's on my wrist.

pc!

11979
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 02, 2016, 03:58:13 am »
only slept 3 hours.. woke up, brain racing.. couldn't go back to sleep.


04/01/2016

Bio: Morning

sleep = 3 hours
- eek
wakeup = 9:30 AM
bw = 150
morning resting heart rate = didn't measure
soreness = none
aches = right tennis elbow slightly
injuries = toenails wrekt
feel = tired



Food

9:30 AM

- pure sugarless green tea
- greek yogurt



Session: Afternoon

11:30 AM - 2 PM

run to court:
- ~3.65 mi

rest ~5 min

non-stop up and back jumps at bball court, backboard taps:
- 60 total @ 1.02 mi in 12:43 min
- rest ~5 min
- 60 total @ 1.01 mi in 10:18 min
- hit rim a few times, but i mostly just jumped relaxed, touching a ~9'4 backboard (barely off R-slrvj, palm and such off L-slrvj)
 
run home:
- ~3.75 mi

pretty /humid hot out.

145 lb. after workout

 :ibrunning:



Food

2 PM

- pure sugarless green tea
- greek yogurt



Food

5 PM

- big bowl (~1.25 cups) of israeli couscous mixed with serrano pepper, red chili pepper, olives, carrots, garlic, olive oil, salt/pepper, lemon juice, and grilled chicken
- orange
- green tea
- water with lemon



Food

9 PM

- half pint ice cream while watching boxing
- hot mint tea



Food

2 AM

- greek yogurt
- beet + tart cherry juice
- banana



got lots of coding done today but.. brain foggy.. so slower/less efficient than I should have been.

body feels pretty good!

only slightly tired right now.. :(

watched the end of the GSW game.. very good game. Celtics finally snapped GSW's home win streak. I want GSW to break that bulls record (72-10), but you never know... GSW is 68-8 right now.. so close.

pc!

11980
Boxing / Boxing Fights 04/01/2016
« on: April 02, 2016, 01:16:01 am »
broner, meh. won what should have been an easy one, but it wasn't so easy for him. not excited to see him fight to say the least. He called out Mayweather Jr. at the end... PBF was just laughing. If that fight gets made, i'd probably never watch boxing again. :D

davis was impressive.. lots of power, sick lead left hands, and brutal uppercuts. guy ended it with 4 straight upper cuts.

easter jr was very impressive. dude controls the distance really well. he's got some slick shots too. ended it with a nasty 1-2.

11981
damn, 54 game home streak snapped. great game, celtics win a close one.

11982
Basketball / Re: A WHOLE BUNCH OF DUNKS AND SHIT.
« on: April 01, 2016, 02:52:09 pm »
so much fail in last night's ncaa dunk contest.. this was epic tho, i was cracking up

<a href="http://www.youtube.com/watch?v=BmKWd0s5S5A" target="_blank">http://www.youtube.com/watch?v=BmKWd0s5S5A</a>

it could have been good if he just landed something though.. just because of the fact that he's dunking on a pancake.

the biggest fail was some guy trying to dunk over this short girl... and missing it.. but.. just prior to that, someone dunked over someone who was like 6'10 or something.

also ike nwamu missed a ton of dunks, even a scorpion.. he made a nasty btl tho. the guy who won it had some nasty dunks. when those come up on youtube i'll post.

11983
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 01, 2016, 02:37:38 pm »
this is what running up and back (60 total) on a basketball court looks like (and doing jumps on each end, coming in from different angles):



^^ 1 mile

hah.


edit: i've wanted to do this for a long time.. this is kind of a "raptor-ish" experiment when it comes to jumping (in regards to relaxation). I've wanted to incorporate running + jumping in the same session for a long time, this is really the first time I did it.

I did 2 x 1 mi (~60 total jumps). all jumps were relaxed.

felt pretty good tbh.. i enjoyed it. It was tough too.. it would be really tough if I was jumping harder.

pc

11984
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 01, 2016, 05:06:47 am »
03/31/2016

Bio: Morning

sleep = 8 hours
wakeup = 2:30 PM
- eek  :ninja:
bw = 148
morning resting heart rate = didn't measure
soreness = hamstrings slightly
aches = right tennis elbow slightly
injuries = toenails wrekt
feel = good



Food

2:30 PM

- green tea
- greek yogurt



Food

5 PM

- 2 chicken tacos
- some nachos chips and salsa



Food

7 PM

- green tea
- mounds bar
- beet/berry juice drink



Food

9 PM

- 1/3 java chip ice cream
- hot mint tea
- few pieces of cookies and cream bark



Food

5 AM

- greek yogurt
- banana



had to do a bunch of stuff today, so rested. wanted to get a run in but.. just rested & coded instead.

new forum news:
- worked alot on styling.. looking nice. just a rough draft but it looks pretty clean. Got breadcrumbs working nicely. Also got some nice /users and /orgs pages, looks pretty pro. Using gravatar's d=identicon param which generates gravatar's even if you don't have one.. makes the forum look very colorful with all of the random avatars. Working on thread post form stuff for the last few hours. That's actually been the hardest part of today. Also fixed the router, doesn't jump at all.. can navigate real fast. Also slowly incorporating 'hidden stuff' for when you're in mobile vs desktop. I want this forum to be mobile first, which it is so far. so that's pretty cool.. just need to make it hide/show certain elements based on the view.. that's always looks pretty slick.
- tomorrow I also need to start creating some special queries, so that when I pull in all "board" info, it also gives me things like board views, latest post in that board, etc.. Just so I can grab everything in one go, easily. I have a bunch of those I need to do, for orgs, users, forums, boards, & threads.
- oh, also need to add 'views'.. every view on a thread & post should increase those counters.
- we're going to have some cool tagging features

pc!

11985
800m+ Running and/or Conditioning / Re: Misc Running Videos
« on: April 01, 2016, 02:22:26 am »
dude the wind isn't the craziest part, he fell and got trampled at the start!

hah ya that too, forgot to mention that.

these dudes are nuts.

Pages: 1 ... 797 798 [799] 800 801 ... 1504